jQWidgets Forums

jQuery UI Widgets Forums Angular [Violation] Added non-passive event listener[…]

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 6 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • mathod
    Participant

    Hello,
    I have this error :

    [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

    When i click on cell’s grid.

    After tests it seems to be because of createInstance in myGridOnCellSelect()

        myGridOnCellSelect(event: any): void {
    let options = {
                    value: value,
                    template: template,
                    theme: 'energyblue'
                };
                 var form = jqwidgets.createInstance('.listAttributes', 'jqxForm', options);
                 form.addEventHandler('formDataChange', (event: any) => {
    
                    console.log("test");
    
                });
    }

    if i comment var form = jqwidgets.createInstance('.listAttributes', 'jqxForm', options); the problem is resolved…
    I don’t understand why i have this warning…
    Do you know how can i resolve that?

    Thanks a lot


    Martin
    Participant

    Hello mathod,

    I have tried to reproduce your case, but did not get such warning.
    Here is an Example.

    You can see more explanation about Passive event listeners Here.
    Maybe you can remove the warning by passing {passive: true} as last argument of addEventListner.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.