Last modified: 2014-10-03 18:05:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72724, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70724 - VisualEditor: Up/down arrow in Firefox broken after using left/right
VisualEditor: Up/down arrow in Firefox broken after using left/right
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: Normal major
: ---
Assigned To: Editing team bugs – take if you're interested!
: upstream
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-11 17:29 UTC by Ed Sanders
Modified: 2014-10-03 18:05 UTC (History)
4 users (show)

See Also:
Web browser: Firefox
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ed Sanders 2014-09-11 17:29:22 UTC
1. place cursor in large body of text in FF
2. Cursor up then down, everything is fine
3. Cursor right a dozen or so times, then up

Then cursor jumps up and left to the same place it was after (2).

Initial investigations show that disabling handling of up/down arrows makes no difference, but disabling handling of left/right does fix, so probably something to do with the surfaceObserver state?
Comment 1 Bartosz Dziewoński 2014-09-30 23:18:23 UTC
Looks like a browser bug with Firefox's native selection having inconsistent state. I'm going to try poking some more at this tomorrow and maybe file some upstream bugs.
Comment 2 Bartosz Dziewoński 2014-10-01 18:59:01 UTC
Minimal test case: http://jsfiddle.net/ybawstce/1/

(This will throw errors in some edge cases, but that's not the point; try arrowing around near the middle of the text.)
Comment 3 Bartosz Dziewoński 2014-10-01 19:09:33 UTC
Calling nativeSelection.collapseToStart() seems to magically fix the erroneous behavior (http://jsfiddle.net/ybawstce/3/), we can probably use that as a workaround for selections that are already collapsed.

(I see no neat way to fix non-collapsed ones; randomly calling some other Selection methods might help, but they probably won't be no-ops. These are a smaller problem anyway and can wait for Firefox to fix their bug.)

I'm filing this upstream.
Comment 4 Bartosz Dziewoński 2014-10-01 19:25:05 UTC
Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1075901
Comment 5 Gerrit Notification Bot 2014-10-01 19:54:08 UTC
Change 164162 had a related patch set uploaded by Bartosz Dziewoński:
ve.ce.Surface: Magic workaround for broken Firefox cursoring

https://gerrit.wikimedia.org/r/164162
Comment 6 Gerrit Notification Bot 2014-10-02 14:53:03 UTC
Change 164162 merged by jenkins-bot:
ve.ce.Surface: Magic workaround for broken Firefox cursoring

https://gerrit.wikimedia.org/r/164162
Comment 7 James Forrester 2014-10-02 16:21:20 UTC
More "worked around" than actually fixed, but…
Comment 8 Bartosz Dziewoński 2014-10-03 13:27:57 UTC
Workaround reverted, caused bug 71580 (ugly-looking "NS_ERROR_FAILURE" exceptions in some cases).
Comment 9 James Forrester 2014-10-03 18:05:26 UTC
Possibly not anything we can actually fix…

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links