Page MenuHomePhabricator

Alt+Shift+V (or other acceskey for visual "Edit" tab) should preserve scroll position (it doesn't on Firefox)
Closed, DuplicatePublic

Description

Alt+Shift+V (or other acceskey for visual "Edit" tab) should always preserve scroll position.

In a quick test, it seems to preserve scroll position on Chrome and Edge, but it does not on Firefox (probably because it focuses the tab).

(Mentioned in https://www.mediawiki.org/wiki/Topic:Uno5n81z8u7kknuq)

Event Timeline

We set the cursor offset to [1,1] (or the first content position, so by current behaviour it should scroll to the top of the page in all browsers.

We could convert the current offset into a section edit command, but we should be mindful of two things:

  • Metrics - we don't want to count this as the user deliberately clicking on a section edit link
  • Section editing - if we implement proper section editing in VE, we don't want this behaviour to kick in just because they used alt+shift+v

With that in mind we should use a separate param (e.g. srcollToSection) that for the time being behaves the same as the section param.

We set the cursor offset to [1,1] (or the first content position, so by current behaviour it should scroll to the top of the page in all browsers.

Hmm, interesting, that does happen sometimes, but not always. I can't tell what is causing it to scroll or not scroll. (Note that the Firefox behavior is still different, it scrolls the "Edit" tab into view, rather than the text cursor).