Skip to content

fix: use document.activeElement for focus check#1755

Merged
LTe merged 1 commit intomasterfrom
PRL-datepicker-support-for-ie11
Dec 7, 2020
Merged

fix: use document.activeElement for focus check#1755
LTe merged 1 commit intomasterfrom
PRL-datepicker-support-for-ie11

Conversation

@LTe
Copy link
Copy Markdown
Contributor

@LTe LTe commented Dec 4, 2020

[PRL-⚡️]

Description

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.

How to test

  • Open DatePicker in IE11 with single and range mode

Screenshots

screencast 2020-12-04 13-52-52

Review

  • Read CONTRIBUTING.md and Component API principles
  • Make sure you've converted all *.example.js/jsx file into *.example.ts/tsx in your PR
  • Annotate all props in component with documentation
  • Create examples for component
  • Ensure that deployed demo has expected results and good examples
  • Ensure that unit tests pass by running yarn test
  • Ensure that visuals tests pass by running yarn test:visual. If not - check the documentation how to fix visual tests
PR 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:visual or @toptal-bot run visual - Run visual tests
  • @toptal-bot run deploy:documentation - Deploy documentation
  • @toptal-bot run package:alpha-release - Release alpha version

@LTe LTe requested a review from a team as a code owner December 4, 2020 13:20
Copy link
Copy Markdown
Contributor

@tmatijev tmatijev left a comment

Choose a reason for hiding this comment

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

❤️ 💯 👏

@LTe LTe force-pushed the PRL-datepicker-support-for-ie11 branch from 4e499f2 to e37e4c6 Compare December 4, 2020 13:21
@LTe LTe added the no-jira label Dec 4, 2020
@LTe
Copy link
Copy Markdown
Contributor Author

LTe commented Dec 4, 2020

@toptal-bot run all

@LTe LTe changed the title [PRL-⚡️] Use document.activeElement for focus check fix: use document.activeElement for focus check Dec 7, 2020
@LTe
Copy link
Copy Markdown
Contributor Author

LTe commented Dec 7, 2020

@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.
@LTe LTe force-pushed the PRL-datepicker-support-for-ie11 branch from e37e4c6 to 940330e Compare December 7, 2020 09:17
@LTe
Copy link
Copy Markdown
Contributor Author

LTe commented Dec 7, 2020

@toptal-bot run all

@toptal-devbot
Copy link
Copy Markdown
Contributor

🎉 Last commit is successfully deployed 🎉

Demo is available on:

Your davinci-bot 🚀

@LTe LTe merged commit 9141f1a into master Dec 7, 2020
@LTe LTe deleted the PRL-datepicker-support-for-ie11 branch December 7, 2020 09:58
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.

4 participants