Page MenuHomePhabricator

Selection can appear on top of toolbar
Open, MediumPublic



image.png (471×535 px, 70 KB)

image.png (574×652 px, 91 KB)

Event Timeline

Switch to fake-selection during scroll, transform it back the instant scrolling stops?

yeah - (unless the selection has moved off screen)
you would still lose copy/paste I think, but that's not so bad, you are unlikely to select->scroll->copy

If we absolutely position the scroll conatiner down 3em so it doesn't go under the toolbar, this fixes the issue on Android (and nicely), but iOS still fails.

The problem with this is we currently don't use a scroll container on Android, we scroll the whole page, so switching to using a scroll container on Android may have other negative effects that need to be tested for (e.g. making the scroll less smooth).

We just got rid of scroll containers in iOS because of all the issues it created with dialogs and the toolbar. This means we are probably going to stick with body scrolling or the foreseeable future so our only option would be to switch to fake selections. Currently fake selections hide the keyboard, but potentially that could be worked around by putting the cursor in a hidden input (the $pasteTarget) which we currently do on Desktop.

JTannerWMF added subscribers: matmarex, JTannerWMF.

Hey @matmarex it appears @Esanders provided a solution here, is this enough to start building?

@JTannerWMF I think Ed actually had a try at it earlier, documented in the subtask at T220634#5214282:

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

  • 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


  • 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).

GIven the above I don't think we should put any more effort into this.

ppelberg moved this task from Up next to Freezer on the VisualEditor board.

Ed actually had a try at it earlier, documented in the subtask at T220634#5214282...

I agree with @matmarex here RE putting this in the freezer considering:

  • The selection appearing on top of the toolbar will not – as best we can tell – prevent contributors from completing their edits
  • Fixing this issue is likely to bring about other issues
matmarex lowered the priority of this task from High to Medium.Jul 17 2019, 7:14 PM