Page MenuHomePhabricator

VisualEditor: Pasting in text containing a tab character causes VE to scroll to the top
Closed, ResolvedPublic1 Estimated Story Points

Description

Intention:
Paste bibliographic information from Google books

Steps to Reproduce:

  1. Almost any book will do for this, but to pick an example http://books.google.co.uk/books?id=VYvS7MyaEE8C
  2. Scroll down to the "Bibliographic information" section at the end
  3. Select everything between the name of the publisher and the first ISBN number. Ignoring whitespace, you should have something like "Academic Press, 2012 ISBN 0123914213" on the clipboard. It is important that the selection spans at least two lines and includes at least one tab character. Other than that it is not vital what infomation from the bib is selected, but this is what I would normally select and gives me problems.
  4. Choose a Wikipedia page with a substantial amount of text, or create one in sandbox
  5. Launch VE and scroll down far enough so the top of the article is no longer visible.
  6. Start a new line and type some text such as "Author name, Book Title, " (this step is essential)
  7. Paste the clipboard contents immediately at the end of this line (this currently has to be done with right-click paste rather than CTrl-V due to another bug, but this was still happening before Ctrl-V got broke)

Actual Results:
The part of the article you are working on (this will usually be the references or bibliography section right at the end of the article) disappears from sight as VE scrolls right to the top of the article.

Expected Results:
The focus should stay at the pasting insertion point.

Scrolling to the top also occurs when a tab is typed from the keyboard, which I assume is related. Possibly this is meant to be a feature, but it is not a very helpful one - I find myself typing tabs while in tables expecting to tab to the next cell as is common on internet forms. I know VE doesn't do this, but the expected behaviour is so ingrained I keep getting caught out. In any case, a tab pasted in with text doing this is definitely a bug.

Reproducible: Didn't try

The bug is quite intrusive to me, I am frequently pasting in source bibliographic information, almost every session.


Version: unspecified
Severity: normal
See Also: T73728: VisualEditor: Copying text causes browser to scroll to the top of the page and move the cursor to the top in Safari

Details

Reference
bz72390

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:58 AM
bzimport set Reference to bz72390.

Confirmed in test2 and betalbs.

Steps to reproduce:

  1. Copy all(or part of) Bibliographic information on http://books.google.co.uk/books?id=VYvS7MyaEE8C. It's a html table.
  1. Paste it at the end of an existing line in a chunk of text of test2 or betalabs. The amount of text should be large enough to allow you to scroll down the page and then paste the table at the end of any line.

Observed result: after pasting, the page scrolls up. The pasted table is correctly placed though. The issue does not happen if a table is pasted on a new line.

Jdforrester-WMF lowered the priority of this task from High to Medium.Jan 15 2015, 12:50 AM
Jdforrester-WMF set Security to None.

Works for me on en.wiki. Feel free to reopen if necessary.