Page MenuHomePhabricator

Pasting contents into slug at end of document breaks surface
Closed, DuplicatePublic

Assigned To
None
Authored By
Krinkle
Feb 17 2015, 6:37 PM
Referenced Files
F42738: after.png
Feb 17 2015, 6:37 PM
F42737: before.png
Feb 17 2015, 6:37 PM
F42741: capture.mov
Feb 17 2015, 6:37 PM
Subscribers

Description

  1. Given a page with a highlighted node at the end of the page. E.g. https://www.mediawiki.org/w/index.php?title=OOjs/Events&oldid=1090830 ends with a <syntaxhighlight> block.
  2. Open another tab and copy a simple heading and line of text into the clipboard.
  3. Back to the main tab, focus the slug and paste.

Unexpected:

  • Content area is visually distorted (left margin is gone) due to the surface documentNode having been replaced with a strange subtree. There's no uncaught exception. Reproducible on mediawiki.org and latest git master.

Before pasting:

before.png (1×1 px, 293 KB)

After pasting:

after.png (1×1 px, 406 KB)

Note that the documentNode element has disappeared (unwrapped?), and in the user interface the margin on the left side is no longer present.

Attachment: