Page MenuHomePhabricator

Synchronize right pane on sidebar focus in mobile view
Closed, DeclinedPublic3 Estimated Story Points

Description

In desktop view we implemented sync between left and right, but in mobile view (minerva) this is not yet working. We should add the same behaviour: Put the text cursor in the respective element on the right when clicking in the sidebar.

This it was is happening in desktop:

Peek 2021-09-15 14-23.gif (936×1 px, 471 KB)

This is what is currently happening in mobile:

Peek 2021-09-15 14-26.gif (936×1 px, 172 KB)

Event Timeline

thiemowmde set the point value for this task to 3.

It looks like the reason we don't have an autofocus is due to a change introduced in T141852. The additional !OO.ui.isMobile() condition in BookletLayout.js$212 prevents ve.ui.MWParameterPage from receiving the focus when selected from the sidebar.

It looks like the reason we don't have an autofocus is due to a change introduced in T141852.

Great find! The reason given there is something we should consider, too...

Autofocus is a good accessibility feature on desktop, but on mobile it makes the on-screen keyboard appear as soon as a dialog is opened, or a page changed.

^ @ECohen_WMDE

Autofocus is a good accessibility feature on desktop, but on mobile it makes the on-screen keyboard appear as soon as a dialog is opened, or a page changed.

Good point @awight - maybe scroll into view is enough. The keyboard opening up could be disruptive, especially if you want to add multiple parameters. Is it possible to scroll without moving the focus?

Is it possible to scroll without moving the focus?

@ECohen_WMDE It looks like scrolling into view already works on mobile so long as the sidebar is expanded. We will handle the case where the sidebar is collapsed (narrow mode) in T290975.

It looks like scrolling into view already works on mobile so long as the sidebar is expanded. We will handle the case where the sidebar is collapsed (narrow mode) in T290975.

Great! Then I think this ticket can be closed. We'll just leave the scrolling as-is. Thanks for checking.