×
Fast Artificial Neural Network. Основы работы (23 окт 2019)

Простейшие примеры работы с ruby-оберткой FANN - для начинающих.

Решено Sirat by VWthemes.com: Unable to preventDefault inside passive event listener...

Больше
4 мес. 2 дн. назад - 4 мес. 2 дн. назад #1 от Aleksej
Sirat, Wordpress Theme by VWthemes.com

While testing Sirat, Wordpress Theme by VWthemes.com, I came across an error that has been repeatedly described since the advent of Chrome v.56:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See www.chromestatus.com/features/5093566007214080


AddEventListenerOptions defaults passive to false. With this change touchstart and touchmove listeners added to the document will default to passive:true (so that calls to preventDefault will be ignored).. If the value is explicitly provided in the AddEventListenerOptions it will continue having the value specified by the page. This is behind a flag starting in Chrome 54, and enabled by default in Chrome 56. See developers.google.com/web/updates/2017/0...rolling-intervention


Appealing for support to a representative of the developer of the Sirat template did not lead to anything: the support redirected me to commercial support forum, refusing to discuss the problem at wordpress.org With all due respect, a very strange way of providing support ... not indicative, in my opinion, of respect for the users of their products.

Bugs need to be fixed, and the decision in this case, in fact, is very simple. If you encounter a similar problem - apply this hack, the error disappears:



Sirat, Wordpress шаблон от VWthemes.com

Тестируя Sirat, очень неплохой Wordpress Theme by VWthemes.com - наткнулся на ошибку, многократно описанную со времен появления Chrome v.56:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive.


AddEventListenerOptions defaults passive to false. With this change touchstart and touchmove listeners added to the document will default to passive:true (so that calls to preventDefault will be ignored).. If the value is explicitly provided in the AddEventListenerOptions it will continue having the value specified by the page. This is behind a flag starting in Chrome 54, and enabled by default in Chrome 56.


Обращение за поддержкой к представителю разработчика шаблона Sirat ни к чему не привело: саппорт переадресовал меня к собственному форуму коммерческой поддержки, отказавшись обсуждать проблему бесплатной темы на wordpress.org . При всем уважении, весьма странный способ оказания поддержки... не свидетельствующий, на мой взгляд, об уважении к пользователям своих продуктов.

Баги необходимо исправлять, а решение в данном случае, собственно, весьма несложно. Если столкнулись с аналогичной проблемой - примените что-то вроде этого хака, ошибка исчезает:



diff --git a/assets/js/SmoothScroll.js b/assets/js/SmoothScroll.js
index 600f948..ce6291e 100644
--- a/assets/js/SmoothScroll.js
+++ b/assets/js/SmoothScroll.js
@@ -553,7 +553,7 @@ function overflowAutoOrScroll(el) {
  ***********************************************/
 
 function addEvent(type, fn) {
-    window.addEventListener(type, fn, false);
+    window.addEventListener(type, fn, {passive: false});
 }
 
 function removeEvent(type, fn) {
=== Sirat ===
Contributors: VWthemes
Tags: left-sidebar, right-sidebar, one-column, two-columns, three-columns, four-columns, grid-layout, custom-colors, custom-background, custom-logo, custom-menu, custom-header, editor-style, featured-images, footer-widgets, sticky-post, full-width-template, theme-options, post-formats, translation-ready, accessibility-ready, threaded-comments, rtl-language-support, blog, portfolio, e-commerce
Requires at least: 4.8
Tested up to: 5.2.2
Requires PHP: 7.2.14
Stable tag: 0.4
License: GPLv3.0 or later
License URI: http://www.gnu.org/licenses/gpl-v3.0.html
Последнее редактирование: 4 мес. 2 дн. назад пользователем Aleksej.

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.