fix: use document.activeElement for focus check#1755
Merged
Conversation
4e499f2 to
e37e4c6
Compare
Contributor
Author
|
@toptal-bot run all |
Contributor
Author
|
@toptal-bot run danger |
In Internet Explorer 11 in case of onBlur action `event.relatedTarget` is always null. In order to support IE11 we can check for `document.activeElement`. In this way we can support modern browsers and IE 11 at the same time.
e37e4c6 to
940330e
Compare
Contributor
Author
|
@toptal-bot run all |
teimurjan
approved these changes
Dec 7, 2020
Contributor
|
🎉 Last commit is successfully deployed 🎉 Demo is available on: Your davinci-bot 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[PRL-⚡️]
Description
In Internet Explorer 11 in case of onBlur action
event.relatedTargetis always null. In order to support IE11 we can check for
document.activeElement. In this way we can support modern browsers andIE 11 at the same time.
How to test
Screenshots
Review
*.example.js/jsxfile into*.example.ts/tsxin your PRpropsin component with documentationexamplesfor componentyarn testyarn test:visual. If not - check the documentation how to fix visual testsPR commands
List of available commands:
@toptal-bot run all- Run whole pipeline@toptal-bot run danger- Danger checks@toptal-bot run lint- Run linter@toptal-bot run test- Run jest@toptal-bot run build- Check build@toptal-bot run test:visualor@toptal-bot run visual- Run visual tests@toptal-bot run deploy:documentation- Deploy documentation@toptal-bot run package:alpha-release- Release alpha version