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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 [BUG]: Canvas captures scroll even when all scroll-related features are disabled #1360
Comments
Are you possibly just looking for the |
could be. I wasn't aware of that prop, is it recent? Let me try it out. |
Not really, has existed for more than a year now but isn't really that well documented 馃槄 |
@bcakmakoglu I don't believe that prop does what I'm looking for. in fact, it doesn't seem to have any effect whatsoever in my app. As a more concrete example, go to https://vueflow.dev/examples/ and add In my app, I have a rather thin + wide canvas which is inline on a longer page. so scrolling this page becomes pretty annoying because to a user it seems like their scroll wheel just stops working, since the canvas is stopping all scroll events regardless of whether or not it ends up using them to produce an effect. |
What you describe is exactly the use-case of |
Ah I see. I was setting it to |
You could track if the |
I guess, but my point is why should I have to do that? why is the library calling preventDefault on events it doesn't use? preventDefault is intended for use cases where javascript is supplanting the original action with a new one, so surely that would be a better solution. I would have to duplicate quite a bit of the code inside the library relating to OS detection and key defaulting which is quite fragile. |
I see your point I'm just giving workarounds until it's fixed 馃槃 |
ah ok 馃槃 I am ok with waiting for a fix, appreciate it! |
Sorry that this hasn't been fixed yet, I am still talking to the ReactFlow team whether this should be considered a bug or not and we're not 100% clear on this yet 馃槄 |
Ah, I wondered what the hold up was. Is there some counter argument they have? Is the discussion public? |
Not a public discussion no, the hold up is that the devs haven't gotten back to me yet 馃槄 |
Is there an existing issue for this?
Current Behavior
When all scroll behaviors are disabled (
pinchToZoom
,scrollToZoom
,scrollToPan
), and a canvas is inserted in a scrolling document, scrolling the page such that the pointer enters the canvas boundaries will immediately halt the scrollExpected Behavior
Scrolling should not be halted if the scroll event is not used by vue-flow to perform some action
Steps To Reproduce
Relevant log output
No response
Anything else?
My thought is that this code should probably only run and "trap" the event if the handler detects that some action should be performed based on the event and current settings. As it stands this issue can be worked around somewhat by adding
nowheel
to the entire canvas, but this only works if it's desired that all events are disabled. if the settings are adjusted so that scroll-to-zoom only happens on cmd/ctrl press, then it's not possible to prevent this issue withnowheel
.The text was updated successfully, but these errors were encountered: