You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tauri: fix: a11y: focus being locked on message input
On Linux and macOS.
Such that you'd be unable to focus anything else
by using the Tab key.
Closes#5097.
Partially addresses
#4590.
This also affects Electron on all platforms and Tauri for Windows:
now we will not re-focus the composer
after you un-select some text in a message.
This can be considered a downside,
but I was not able to come up with a simple soltuion
that I am sure is also good accessibility-wise.
On WebKit, the `selectionchange` event fires pretty much every time
something is clicked or when focus changes.
Namely, it fires when the focus exits the composer,
which is what caused the bug.
Although this is gonna be a bit annoying for mouse users
that they now have to click the composer manually
after certain actions, I am afraid we can't keep
the approach of always keeping it in focus by default.
Instead we should only focus it only in some concrete cases,
where we are sure it is appropriate.
The majority of the "always keep composer in focus" code
has been introduced in 199ea23
(#2007).
The idea was to keep it in focus _by default_,
except some specific cases:
> Maybe we should rather listen for the blur event
> on the composer text area and check there
> if we want to give up the focus.
Some other issues related to composer re-focusing:
- 5dfc265.
- 24510e9.
- 5f54cb7.
(#3313,
#3286).
0 commit comments