https://bugzilla.wikimedia.org/show_bug.cgi?id=67340

--- Comment #3 from Roan Kattouw <[email protected]> ---
(In reply to Roan Kattouw from comment #2)
> Hmm, this sounds like a bug related to ClippableElement. The menu should
> automatically clip and become scrollable when there isn't enough screen
> space for it. You can see this on desktop if you resize the window. Maybe
> iOS Safari isn't emitting a resize event, or is emitting an event we're not
> listening to, or isn't giving us the correct viewport dimensions?

Juliusz explained to me that there's a bug in iOS Safari when the keyboard
comes up: the viewport becomes smaller, but measuring the viewport does not
take this into account. The hack Juliusz is currently using in MobileFrontend
to compensate for this is to arrange the document such that the main viewport
never scrolls, instead everything is wrapped in a scrollable <div> that's
exactly the size of the viewport. Then he listens for focus events, and
attempts to scroll the viewport down by a large amount (9999px or something?).
Under normal circumstances, this has no effect, but if the keyboard is up, the
viewport will be scrollable and measuring how much it scrolled by gives you the
height of the keyboard. He then adjusts the sizing of the wrapper <div> so it
once again fits the viewport exactly.

This is also part of why things sometimes behave very strangely when focus
events are dropped or emitted at the wrong time, because then Juliusz's code
may not notice that the keyboard has appeared or disappeared, and it may not
adjust the size of the wrapper <div> when it should.

To address this bug, we would have to have menus clip to this wrapper div
rather than the body, and we would have to have them reevaluate their clipping
state (by calling .clip()) every time this wrapper <div> is resized.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to