Page MenuHomePhabricator

Behavior of headers in all mobile overlays is inconsistent between iOS and Android (they are not sticky on iOS with keyboard open)
Open, LowPublic

Assigned To
None
Authored By
matmarex
Mar 15 2019, 5:25 PM
Referenced Files
F28500908: MGSC7616.MP4
Mar 28 2019, 8:41 PM
F28483301: IMG_F44A1F113BD0-1.jpeg
Mar 27 2019, 12:54 PM
F28393410: unnamed.gif
Mar 15 2019, 5:38 PM

Description

Behavior of headers in all overlays on the mobile sites is inconsistent between iOS and Android. On Android, they are always sticky (shown on top of the viewport if you scroll). On iOS, they are only sticky until you open the software keyboard, at which point they can be scrolled away.

This task is to decide whether they should be sticky at all, and if they should, then how to implement that, given iOS Safari's reckless disregard for position: fixed.

(This task covers all overlays except VisualEditor, where the toolbar must be sticky, see T218414.)

Additional notes

When the soft keyboard is open iOS any fixed headers are pushed upwards like so:

unnamed.gif (264×537 px, 343 KB)

(Imagine "Header" as being the editing toolbar)

Currently only the talk and editor overlays have textarea/input fields but in future this could impact other places.

Design conclusion

Since the inconsistent behavior between Android and iOS is the result of an OS-level difference it is not critical (or realistic) for us to have a consistent overlay experience between iOS and Android.

Our rule for now is: modal/overlay headers are fixed (on iOS and Android), and we are generally okay with the iOS-specific behavior where tapping into a <textarea> (or similar such element), un-fixes the header. There may be specific cases where the header must always remain fixed, which we will address in a one-off manner (probably using JS).

Event Timeline

We need to make a decision about this next week @alexhollender with the editing team. A meeting is going to get setup sometime next week so moving to designing right now.

I've left a comment on T218414 to address desired VE behavior. Regarding all other overlays, I think it's safe to say that the rule should be that the header remains fixed, regardless of the keyboard being open or closed. Perhaps there will be exceptions in the future, but it seems like a sensible starting point to keep them fixed by default.

Spoke with @Jdlrobson and now have more context here. As I understand it, on iOS (any browser) fixed elements only scroll away as the result of tapping into a <textarea> element (note this doesn't occur for <input>). Since the inconsistent behavior between Android and iOS is the result of an OS-level difference I don't think it's critical (or realistic) for us to have a consistent experience.

I think our rule should be something like: modal/overlay headers are fixed, aside from when a user is in a <textarea> element.

@Jdlrobson @matmarex is there any additional design input needed here? If not please let me know and I will move this out of our #nirzar-is-cool column.

As I understand it, on iOS (any browser) fixed elements only scroll away as the result of tapping into a <textarea> element (note this doesn't occur for <input>).

This isn't quite correct. The fixed elements scroll away whenever the keyboard is open. This includes tapping into a <textarea>, <input type=text> (or similar), <select>, or any contenteditable element (I'm not sure if this is a complete list).

Since the inconsistent behavior between Android and iOS is the result of an OS-level difference I don't think it's critical (or realistic) for us to have a consistent experience.

Sounds reasonable to me.

As I understand it, on iOS (any browser) fixed elements only scroll away as the result of tapping into a <textarea> element (note this doesn't occur for <input>).

This isn't quite correct. The fixed elements scroll away whenever the keyboard is open. This includes tapping into a <textarea>, <input type=text> (or similar), <select>, or any contenteditable element (I'm not sure if this is a complete list).

For clarity: as far as I can tell the search header, which is an <input> element, remains fixed while the keyboard is up:

IMG_F44A1F113BD0-1.jpeg (750×1,334 px, 346 KB)

Jdlrobson lowered the priority of this task from High to Low.Mar 28 2019, 8:25 PM

Marking as low for the time being given T218415#5048313 and the technical solutions are not pretty.

In T218415#5061724, @alexhollender wrote:

For clarity: as far as I can tell the search header, which is an <input> element, remains fixed while the keyboard is up:

IMG_F44A1F113BD0-1.jpeg (750×1,334 px, 346 KB)

It is visible when you initially open the keyboard, but it disappears when you scroll with the keyboard open.

I tested it and found that there is a weird inconsistent behavior where the keyboard will sometimes close when you start scrolling. I don't know why that happens, and when it does, then the header of course stays fixed. But if the keyboard doesn't close, the header scrolls out of view.

Recording:

Jdlrobson raised the priority of this task from Low to Needs Triage.Dec 8 2023, 9:48 PM

Since converting mobile search to Codex is not happening any time soon, this should probably be moved back to the team backlog and re-prioritized.

ovasileva subscribed.

Moving back to tech backlog as we're likely to look at Codex search for mobile in Q4

Per the web team's quarterly grooming, these tasks are being removed from the team's backlog.