Last modified: 2014-10-21 21:37:03 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 T70832, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68832 - VisualEditor Mobile: Toolbar does not float while tapping towards the end of the screen
VisualEditor Mobile: Toolbar does not float while tapping towards the end of ...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Mobile (Other open bugs)
unspecified
All All
: Low normal
: VE-deploy-nextup
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-30 00:51 UTC by Rummana Yasmeen
Modified: 2014-10-21 21:37 UTC (History)
7 users (show)

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


Attachments
Screenshot (55.30 KB, image/jpeg)
2014-07-30 00:51 UTC, Rummana Yasmeen
Details

Description Rummana Yasmeen 2014-07-30 00:51:04 UTC
Created attachment 16098 [details]
Screenshot

Steps to reproduce:

1.Open a page with mobile VE on iOS Safari
2.Tap on the last line that is visible on current screen 

Observed Result:
The page focus moves down a bit but the toolbar does not float.If you close the keyboard it appears again but some part of the toolbar gets cut off

See the screenshot attached.
Comment 1 James Forrester 2014-07-30 19:27:02 UTC
Juliusz's thoughts: Height of tabs not taken into account? Too many things going on at the same time (keyboard not yet open so doesn't take into account its height properly)?
Comment 2 Gerrit Notification Bot 2014-07-30 23:14:40 UTC
Change 150727 had a related patch set uploaded by JGonera:
Delay calculating available area height when keyboard opens

https://gerrit.wikimedia.org/r/150727
Comment 3 Gerrit Notification Bot 2014-07-30 23:20:28 UTC
Change 150727 merged by jenkins-bot:
Delay calculating available area height when keyboard opens

https://gerrit.wikimedia.org/r/150727
Comment 4 Rummana Yasmeen 2014-07-30 23:38:55 UTC
Verified the fix on Betalabs
Comment 5 Rummana Yasmeen 2014-07-31 21:20:18 UTC
This one is not working on test2 for some reason :(
test2 is running wmf16 now
Comment 6 Juliusz Gonera 2014-08-06 00:31:05 UTC
This is happening because iOS Safari doesn't fire the "focus" event the first time CE is focused (or something prevents the propagation of the event). Might be somewhat related to the bug about the cursor being moved to the beginning of CE (bug 66697).
Comment 7 Juliusz Gonera 2014-08-06 01:19:35 UTC
ve.ce.Surface.prototype.onFocusChange seems to be stopping the propagation of "focus" event when CE is focused for the first time. Making ve.ce.Surface.prototype.onFocusChange a noop fixes this bug (but is obviously not the right solution).
Comment 8 Juliusz Gonera 2014-08-06 01:30:18 UTC
More precisely it's ve.ce.Surface.prototype.onDocumentFocus.
Comment 9 Juliusz Gonera 2014-08-07 03:13:50 UTC
Reverting 71395e1f (https://gerrit.wikimedia.org/r/#/c/139677/) fixes this bug but brings back bug 65928. Need to consult with Ed.
Comment 10 Juliusz Gonera 2014-08-07 21:43:58 UTC
Digging deeper into the rabbit hole...

* Commenting out "this.emit( 'select', this.selection && this.selection.clone() );" in ve.dm.Surface.prototype.setSelection also fixes the bug. It also seems to be fixing bug 66697.

* Making ve.ce.Surface.prototype.onModelSelect a noop also seems to fix both bugs.

* Commenting out "this.showSelection( selection );" ve.ce.Surface.prototype.onModelSelect seems to fix both bugs too.

I suspect we're either doing something weird that iOS Safari doesn't like or perhaps there is a bug in Rangy.
Comment 11 Juliusz Gonera 2014-08-20 01:01:01 UTC
This is weird. I tried following the call stack deeper to see what exactly causes the problem, but I'm stuck in ve.ce.Surface.prototype.showSelection.

It seems I have to comment out:

	if ( this.getElementDocument().activeElement !== documentElement ) {
		documentElement.focus();
	}

plus at least _one_ (either or both) of the following:

		rangyRange.setStart( selection.start.node, selection.start.offset );
		rangySel.setSingleRange( rangyRange );

I'm wondering if iOS Safari has some weird bug where it drops events when something tries to modify the same DOM node too many times.
Comment 12 Gerrit Notification Bot 2014-08-22 00:40:35 UTC
Change 155678 had a related patch set uploaded by JGonera:
[WIP] Do not focus CE on mobile when editor opens

https://gerrit.wikimedia.org/r/155678
Comment 13 Gerrit Notification Bot 2014-08-22 22:51:01 UTC
Change 155678 merged by jenkins-bot:
Do not focus CE on mobile when editor opens

https://gerrit.wikimedia.org/r/155678
Comment 14 Rummana Yasmeen 2014-08-22 23:53:01 UTC
Still not working for me.I tried on this page: http://en.m.wikipedia.beta.wmflabs.org/wiki/21staugustchrome

But it's reproducible for any page.
Comment 15 Juliusz Gonera 2014-08-25 17:17:42 UTC
We might need to wait unitl https://gerrit.wikimedia.org/r/#/c/155671/ is merged.
Comment 16 Gerrit Notification Bot 2014-08-25 17:26:55 UTC
Change 155671 had a related patch set uploaded by Jforrester:
Don't trigger focus event on contenteditable in VE

https://gerrit.wikimedia.org/r/155671
Comment 17 Gerrit Notification Bot 2014-08-25 17:32:31 UTC
Change 155671 merged by jenkins-bot:
Don't trigger focus event on contenteditable in VE

https://gerrit.wikimedia.org/r/155671
Comment 18 James Forrester 2014-08-25 17:36:34 UTC
Maybe now?
Comment 19 Rummana Yasmeen 2014-08-25 19:31:32 UTC
The issue got resolved for the aforementioned steps , but still it is occurring for the following case 

1.Open the page.
2.Tap on an existing link from the page.
3.Open the link inspector when the context menu for it appears.
4.Just close the link inspector tapping on the "Done" button.
5.Now tap anywhere in the CE.

You will see the toolbar did not float this time.
Comment 20 Rummana Yasmeen 2014-08-29 19:01:47 UTC
It happens after opening and closing citation dialogs as well
Comment 21 Rummana Yasmeen 2014-09-04 21:27:31 UTC
Also , as Roan specified in https://bugzilla.wikimedia.org/show_bug.cgi?id=68828

After coming to CE and tapping somewhere , the scrolling to the top of the page does not work,which might be related to this issue.So we are keeping both the issues in same place for now and closing the other one.

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


Navigation
Links