Page MenuHomePhabricator

Selection experiment: Deactivate selection on scroll past viewport
Closed, DeclinedPublic

Description

..or far enough past viewport? (scroll anchor / focus / whole lot must be past the viewport

More extreme version:
Immediately deactivate when you start to scroll

  • Test this with extending selection beyond screen, triggering scrolling. Might need to debounced based on the last selection change event

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This seems to be missing some context. Is this the same as T217797: Selection can appear on top of toolbar, and if not, what is the difference?

This is a more specific proposed solution. There are other approaches to T217797 such as T217797#5006503, although I don't think that will work in iOS.

The proposal states that we don't deactivate the selection until the entire thing is off screen, which is sensible as I may want to scroll a bit to expand a large selection. However in this case it will only be a minor improvement to T217797. That said it might still be worth doing for it's own sake.

I created a rough implementation of this and there are issues on Android and Safari:
Android:

  • When scrolling up, the closing of the keyboard causes the selection to jump back down about 30px. It isn't terrible, but not perfect either

iPhone:

  • As safari lies about the size of the viewport the behaviour is all over the place. We also know we will never be able to know where the bottom of the viewport is when the keyboard is open, so this may be a non starter, at least for scrolling up (pushing content down).

Actually, I'll close this one. We experimented, it didn't work very well, there's nothing else to do. We should leave just the parent task open, since that describes the ongoing problem.