Unable to preventDefault inside passive event listener

Posted by: 1728884346 on 26 July 2019, 1:14 pm EST

  • Posted 26 July 2019, 1:14 pm EST - Updated 29 September 2022, 1:51 am EST

    Hi,

    once show popup, then use mouse wheel to scroll the backend page, Chrome throw the error.

    “Unable to preventDefault inside passive event listener due to target being treated as passive.”

  • Posted 28 July 2019, 7:41 pm EST

    Hi,

    Could you please provide us with a sample that replicates the issue so we can investigate further. In case you are unable to provide a sample, could you please modify the sample below so that it replicates the issue.

    FlexGrid_Popup.zip

    Regards,

    Ashwin

  • Posted 31 July 2019, 12:49 pm EST

    Hi Ashwin

    you may try to make body more higher, and scroll the body with mouse wheel.

  • Posted 31 July 2019, 11:19 pm EST

    Hi,

    We are sorry but we were still not able to replicate the issue. Please refer to the steps below that we used to replicate the issue.

    1. In the above sample, added another FlexGrid whose height was larger than the screen so the body of the webpage can be scrolled.
    2. Open the Popup using the show method.
    3. Tried to scroll the body using mouse wheel inside and outside the popup but still no error.

    Could you please tell us whether we are missing something in order to replicate the issue?

    ~regards

    FlexGrid_Popup_Updated.zip

  • Posted 1 August 2019, 8:55 pm EST

    Hi ashwin,

    i think it’s because C1.Web.Mvc.dll version is different. i’m using 4.0.20182.164, your example is 4.0.20191.210

    refer to attach gif

    with version 4.0.20182.164, it can scroll and error

    with version 4.0.20191.210, it cannot scroll

  • Posted 1 August 2019, 8:56 pm EST

    attachmentPopupScroll.zip

  • Posted 4 August 2019, 7:26 pm EST

    Hi,

    We were able to replicate the issue with the specified version. This issue was recognized as a bug and has been fixed in the build version 4.0.20183.176. We would suggest you to upgrade to this version. Let us know if you face any issues while upgrading.

    ~regards

  • Posted 6 August 2019, 1:11 pm EST - Updated 29 September 2022, 1:52 am EST

    Hi ashwin, refer to image below, i tried version 4.0.2018.3.186, seem it no more error,

    but dont know how your team fix it, seem it cannot be scrolled, unless mouse over the popup window or mouse click the body scroll bar. is it expected behaviour?

    original is when mouse over anywhere, it can be scroll.

  • Posted 6 August 2019, 5:24 pm EST

    Hi,

    This is the expected behavior of a Popup. When a Popup is shown in a modal dialog, the elements that are behind the popup are not accessible using the mouse and therefore the body cannot be scrolled.

    ~regards

  • Posted 17 August 2019, 7:57 pm EST

    Hi ashwin, thank for response, understand the behind element is not accessible, but is possible to make body scrollable when Popup shown? sometime feel it useful to view some information if allow to scroll.

  • Posted 18 August 2019, 7:08 pm EST

    Hi,

    You may handle the wheel event of the body event and if the event target is ‘wj-popup-backdrop’, then scroll the window accordingly:

    document.body.addEventListener('wheel', e => {
            if (wijmo.hasClass(e.target, 'wj-popup-backdrop')) {
                window.scrollBy(e.deltaX, e.deltaY);
            }
    }, true);
    

    Please refer to the updated sample attached.

    ~regards

    FlexGrid_Popup.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels