Page MenuHomePhabricator

Pasting content results in scroll flickering
Closed, ResolvedPublic8 Estimated Story Points

Description

  1. Edit medium to long document. (mediawiki.org/OOjs)
  2. Paste plain text content from an another web page. (github:wikimedia/oojs#readme)

Unexpected:
Page scrolls, causing some kind of distorted pain rendering, and moves back to (almost) the same position, showing the pasted contents.

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF set Security to None.

@Krinkle, from quick testing this looks like it's fixed for me – can you confirm?

Hasn't changed much. It still scrolls to the top leaving the user nowhere near the content that was affected or inserted having to scroll back down manually to reveal the pasted content. The only difference I saw is that, aside from jumping to the top, it now also briefly animates down a few pixels.

  1. https://www.mediawiki.org/w/index.php?title=OOjs&veaction=edit
  2. Cursor at start of Compatibility paragraph.
  3. Return to start new paragraph under this heading.
  4. Copy text (e.g. "OOjs is optimised for modern ECMAScript 5 environments. However, care has been taken to maintain parser compatibility with ES3 engines (such as for IE 6-8).").
  5. Paste text.

Expected:
Scroll offset unchanged.

Actual:
Page scrolls back to the very top of the page, and then animates down a few pixels to the top of the editor surface.

New capture:

Note that I'm manually scrolling from the top of the article back down to where the text is pasted, that's not done by the software.

Change 238746 had a related patch set uploaded (by Esanders):
Restore scroll immediately after paste

https://gerrit.wikimedia.org/r/238746

Change 238746 merged by jenkins-bot:
Restore scroll immediately after paste

https://gerrit.wikimedia.org/r/238746

Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF edited a custom field.