Page MenuHomePhabricator

VisualEditor Mobile: The page focus always bumps up to the top irrespective of cursor position
Closed, ResolvedPublic1 Estimated Story Points


Steps to reproduce:

1.Open a page with mobile VE
2.Tap somewhere in the middle of the page or towards the end

Observed Result:
The page focus bumps up to the top of the page, not getting scrolled down to the point where the cursor is actually positioned.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:32 AM
bzimport set Reference to bz70111.

jgonera wrote:

"The page focus bumps up to the top of the page" - you mean the page is scrolled to the top or the cursor moves to the top?

The page scrolls up, the cursor is correctly positioned with the fix of

jgonera wrote:

Correction: the page doesn't scroll up. It should scroll up when the keyboard opens and covers up the cursor. Instead, the page stays in place.

This is because we no longer scroll the whole page on iOS (we scroll inside of a div) and Safari's default mechanism for preventing the cursor from being covered by the keyboard doesn't work anymore (that's my guess).

I think an easy solution would be to implement scrolling the CE on focus in such a way that the cursor ends up being close to the top of the screen. This way the keyboard won't occult it. We have to keep in mind though that this code should only run on iOS (which is easy because we already let MobileViewTarget know that we're on iOS using isIos config argument).

jgonera wrote:

Maryana said that she doesn't consider that very high priority so I might not get to it before I leave. Unassigning myself.

Jdforrester-WMF claimed this task.

Seems to work for me now. Tested on Beta Cluster using iOS Safari 8.0 on an iPad.