Uh oh!
There was an error while loading. Please reload this page.
Improved browser compatibility for table scroll - #5051
Conversation
Uh oh!
There was an error while loading. Please reload this page.
archmoj
commented
Aug 6, 2020
Could you please investigate why these two tests are failing? plotly.js/test/jasmine/tests/table_test.js Line 446 in a54c502 plotly.js/test/jasmine/tests/table_test.js Line 472 in a54c502 |
ManelBH
commented
Aug 6, 2020
Yeah, apparently the tests check that the 'mousewheel' event is raised so they fail when 'wheel' is used instead. |
archmoj
commented
Aug 6, 2020
Those tests were added in #3327 so I'll request a review from @alexcjohnson. |
ManelBH
commented
Aug 6, 2020
Sorry it's my first PR and I'm not sure what's the expected thing to do in such cases, do I add a change to the test to handle the 'wheel' event? |
alexcjohnson
commented
Aug 6, 2020
Nice fix @ManelBH ! In fact looking around our code, we have a number of places that only plotly.js/src/plots/cartesian/dragbox.js Lines 1228 to 1232 in a54c502
But we don't need to clean all of that up now. It should be fine to change the test to use |
archmoj
commented
Aug 7, 2020
@ManelBH after 7f983c5 there is still one failing test: plotly.js/test/jasmine/tests/table_test.js Line 446 in a54c502 |
archmoj
commented
Aug 7, 2020
The |
Fixes#5052.
Currently the table scroll uses the non-standard 'mousewheel' event which is not supported by firefox (and maybe other browsers). Changed it to the standard 'wheel' event, supported by most browsers, with a fallback to 'mousewheel' just in case.