Skip to content

Plotly table hijacks page scrolling #3249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anikets43 opened this issue Nov 16, 2018 · 9 comments · Fixed by #3327
Closed

Plotly table hijacks page scrolling #3249

anikets43 opened this issue Nov 16, 2018 · 9 comments · Fixed by #3327
Assignees
Labels
bug something broken
Milestone

Comments

@anikets43
Copy link

anikets43 commented Nov 16, 2018

I implemented as per https://plot.ly/javascript/table/

Issue: When we have full width table, page scrolling doesn't work even the table scrolls end. This completely creates confusion and looks like page is hanged.

@AbdealiLoKo
Copy link

untitled
I've faced the same issue and can reproduce in the examples on that page too.

@alexcjohnson
Copy link
Collaborator

Thanks @anikets43 - agreed, this is a bug.

@alexcjohnson alexcjohnson added the bug something broken label Nov 16, 2018
@alexcjohnson
Copy link
Collaborator

FWIW scrollable legends do not have this issue: when you reach the end of a legend, the page does start scrolling.

@AbdealiLoKo
Copy link

@alexcjohnson by any chance is there a workaround for this?
I have a few pages which need to predominantly render tables and if I go to that section of my webpage I'm basically stuck and unable to do anything. Need to find some margin at the extreme corner.

Got a few bug reports from users that the webpage is stuck and hanging their browser =P

@alexcjohnson
Copy link
Collaborator

@etpinard let's try to address this for 1.43 - even staticPlot doesn't avoid it.

@alexcjohnson alexcjohnson added this to the v1.43.0 milestone Dec 3, 2018
@AbdealiLoKo
Copy link

Do let me know if I can help in any way. I'm not adept in js (I use plotly.py ...) otherwise would have attempted a PR...
If I can help by providing debug info or testing or something else pleas feel free to ping me

@anikets43
Copy link
Author

@alexcjohnson
In my aplication too this is a major blocker as we have a huge full page table and can't scroll on that page.
Is there a way for me to comment out this event blocking in my server where I am using plotly ? Could you point me to where this event bubbling chain stops ? I'd like to try commenting out the e.preventDefault() or whatever is causing this scroll hijack and see whether it fixes it for my table.

@alexcjohnson
Copy link
Collaborator

This looks like the relevant handler:

.on('mousewheel', function(d) {
if(d.scrollbarState.wheeling) return;
d.scrollbarState.wheeling = true;
d3.event.stopPropagation();
d3.event.preventDefault();
makeDragRow(gd, tableControlView, null, d.scrollY + d3.event.deltaY)(d);
d.scrollbarState.wheeling = false;
})

@anikets43
Copy link
Author

Thanks @alexcjohnson
This would work for now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants