Skip to content
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

Increase scroll threshold when dragging Patterns in Zoom Out #67570

Open
getdave opened this issue Dec 4, 2024 · 5 comments
Open

Increase scroll threshold when dragging Patterns in Zoom Out #67570

getdave opened this issue Dec 4, 2024 · 5 comments
Labels
[Feature] Zoom Out [Type] Enhancement A suggestion for improvement.

Comments

@getdave
Copy link
Contributor

getdave commented Dec 4, 2024

What problem does this address?

Currently you can scroll the page when dragging blocks but the threshold for activating the scroll is very small. It is perhaps about 30px threshold which may mean

  • people don't discover it
  • it's difficult to access for people with certain accessibility needs

What is your proposed solution?

Increase the threshold.

Screen.Capture.on.2024-12-04.at.11-20-33.mp4
@getdave getdave added [Feature] Zoom Out [Type] Enhancement A suggestion for improvement. labels Dec 4, 2024
@getdave
Copy link
Contributor Author

getdave commented Dec 4, 2024

cc'ing @richtabor who demoed this to me and may wish to add additional context

@jorgefilipecosta jorgefilipecosta self-assigned this Dec 4, 2024
@getdave
Copy link
Contributor Author

getdave commented Dec 16, 2024

@jorgefilipecosta Did you have any luck here?

@jorgefilipecosta
Copy link
Member

Hi @getdave, unfortunately, I did not get luck on this one. I tried to understand what makes the editor scroll while dragging. Initially, I thought it was the code on packages/block-editor/src/components/block-draggable/use-scroll-when-dragging.js but it is not that code, even removing that code scrolling while dragging from the inserter happens.
It seems like the browser is the one doing the scroll while we drag from the inserter so we don't have much control of this. We may need to implement some custom logic to make the scroll happen with a threshold we can configure.
I'm unassigning this one for now in case someone wants to explore or has an idea to fix this.

@jorgefilipecosta jorgefilipecosta removed their assignment Dec 17, 2024
@ellatrix
Copy link
Member

The custom scrolling behaviour does not work at all currently: #67303 (comment)

@ellatrix
Copy link
Member

So it's not a matter of increasing a threshold but a matter of restoring it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Zoom Out [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants