Joomla 4. Компонент K2 и форк K2ForJ4 (18 янв 2024)

Если вас, как и меня, достало выслушивать (вычитывать) бесконечные обещания разработчика K2 опубликовать версию компонента K2 под Joomla 4 (без чего невозможно реализовать апгрейд from Joomla 3 to Joomla 4) - воспользуйтесь форком K2ForJ4. Который в данный момент установлен и без каких-либо проблем работает на этом веб-сайте.

Sirat by VWthemes.com: Unable to preventDefault inside passive event listener...

Больше
4 года 9 мес. назад - 4 года 9 мес. назад #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 . При всем уважении, весьма странный способ оказания поддержки... не свидетельствующий, на мой взгляд, об уважении к пользователям своих продуктов.

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



Code:
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) {
Code:
=== 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 года 9 мес. назад пользователем Aleksej.

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

Dev banner 1
Работает на Kunena форум