Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize auto select detection when focus returns to an editable te…
…xt control from outside a browse mode document. (#17503) Fixes #17501. Summary of the issue: In web browsers, if you focus an editable text control, switch to browse mode, move focus out of the document (e.g. by switching applications) and then switch back to focus mode, changes to the text selection (e.g. shift+arrows) stop being reported. Description of user facing changes In web browsers, changes to text selection no longer sometimes fail to be reported in editable text controls. Description of development approach EditableTextWithAutoSelectDetection objects initialize auto select detection in event_gainFocus. However, when in browse mode, we deliberately ignore focus events when focus returns from outside the document. This means that event_gainFocus is never called and thus auto select detection is never initialized. The result is that when the user returns to focus mode with an editable text control focused, auto text selection isn't initialized and thus doesn't work at all. We already handle this initialization in BrowseModeDocumentTreeInterceptor._postGainFocus for some cases. However, we previously weren't calling this when focus returned from outside the document. With this change, we do. Note that initAutoSelectDetection is the only thing currently performed by _postGainFocus, via the override in the Gecko_ia2 vbuf.
- Loading branch information