Last modified: 2014-09-04 21:19:19 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 T68697, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66697 - VisualEditor Mobile: Cursor jumps to the beginning of the article, irrespective of the position user trying to tap and put the cursor into
VisualEditor Mobile: Cursor jumps to the beginning of the article, irrespecti...
Status: VERIFIED FIXED
Product: VisualEditor
Classification: Unclassified
Mobile (Other open bugs)
unspecified
All All
: Normal normal
: VE-deploy-2014-08-28
Assigned To: Juliusz Gonera
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-16 23:41 UTC by Rummana Yasmeen
Modified: 2014-09-04 21:19 UTC (History)
9 users (show)

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


Attachments

Description Rummana Yasmeen 2014-06-16 23:41:00 UTC
Steps to reproduce:

1.Open a page with Mobile VE
2.Tap somewhere in the middle of the article
3.Insert some text
4.Close the keypad
5.Now again tap at the end of the text that you typed in

Observed Result:
The cursor moves to the beginning of the article, not where the user wanted to start his edit.

Device: iPad Mini
iOS:7.1.1
Environment:Production and Betalabs
Comment 1 James Forrester 2014-07-02 19:38:21 UTC
Might be related to the context being wrong in iOS?
Comment 2 Juliusz Gonera 2014-08-07 21:27:05 UTC
Might be related to bug 68832.
Comment 3 Juliusz Gonera 2014-08-22 20:46:49 UTC
Trying to figure this one out now.

If you set hasFocus to false in ve.ce.Surface#onFocusChange, the problem goes away.

If you already have the fix for bug 68832 [1][2], then this is easier to reproduce because it happens on every tap on the CE.

[1] https://gerrit.wikimedia.org/r/#/c/155678/
[2] https://gerrit.wikimedia.org/r/#/c/155671/
Comment 4 Juliusz Gonera 2014-08-22 20:52:19 UTC
It's because we call

    this.getModel().selectFirstContentOffset();

in ve.ce.Surface#onDocumentFocus as a workaround for Firefox. I guess we'd want this.dragging to be true when someone taps on a touch device, but it's false instead.
Comment 5 Juliusz Gonera 2014-08-22 21:20:16 UTC
this.dragging is false because onFocusChange is called after onDocumentMouseUp.

The order of events on iOS Safari seems to be fine though:

* mousedown
* focus
* mouseup
Comment 6 Gerrit Notification Bot 2014-08-22 22:33:21 UTC
Change 155839 had a related patch set uploaded by JGonera:
Check for selection in ve.ce.Surface#onDocumentFocus

https://gerrit.wikimedia.org/r/155839
Comment 7 Gerrit Notification Bot 2014-08-27 00:10:07 UTC
Change 155839 merged by jenkins-bot:
Check for selection in ve.ce.Surface#onDocumentFocus

https://gerrit.wikimedia.org/r/155839
Comment 8 Rummana Yasmeen 2014-08-27 23:21:38 UTC
The original issue that cursor jumps to the beginning of the article is resolved, but still remains issue where the page is not actually getting scrolled down to the point where the cursor is currently positioned at.I have filed a different bug on that (https://bugzilla.wikimedia.org/show_bug.cgi?id=70111) as discussed with Roan.
Comment 9 Rummana Yasmeen 2014-08-28 21:15:18 UTC
Verified the fix in test2
Comment 10 Rummana Yasmeen 2014-09-04 21:19:19 UTC
Verified the fix in production

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


Navigation
Links