Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix annotation input focus trap regression in Safari #13232

Merged

Conversation

CetinSert
Copy link
Contributor

@CetinSert CetinSert commented Apr 13, 2021

setSelectionRange(0, 0) added in 44b24fc for #12359, required only by Firefox (bug), causes issues #13191, #12592 in Safari.
scrollLeft = 0 is a fix that breaks the focus trap in Safari while keeping Firefox behavior same for #12359.


Minimal case here: http://jsfiddle.net/mv08ekay/5/ (~10 LoC - no PDF.js)


scrollLeft answer from @emilio (a Mozilla / Firefox developer):

`setSelectionRange(0, 0)` added in mozilla@44b24fc for mozilla#12359, required only by Firefox ([bug](https://bugzilla.mozilla.org/show_bug.cgi?id=860329)), causes issues mozilla#13191, mozilla#12592 in Safari.
`scrollLeft = 0` is a fix that breaks the focus trap in Safari while **keeping Firefox behavior same for mozilla#12359**.
@CetinSert
Copy link
Contributor Author

CetinSert commented Apr 13, 2021

#13229 (review)
#13229 (review)

@Snuffleupagus - here you go!

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://bugzilla.mozilla.org/show_bug.cgi?id=860329#c8, it should be the correct way to fix so r+.
Thanks for doing this.

@calixteman calixteman merged commit d498897 into mozilla:master Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants