Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

chore(infrastructure): Workaround for Edge autofocus bug #3498

Merged
merged 1 commit into from
Sep 2, 2018

Conversation

acdvorak
Copy link
Contributor

@acdvorak acdvorak commented Sep 2, 2018

This PR adds a ponyfill for autofocus to test/screenshot/fixture.js as a workaround for Edge platform issue #101198:

Autofocusing does not work on first page load. Autofocusing works only after reloading the page (either by pressing F5 key, or by clicking Refresh button, or by focusing location bar and pressing Enter again), so effectively autofocus does not work at all.

This was supposedly fixed in Edge 15, but in PR #3496, the first screenshot fails 100% of the time in Edge 17 due to a <select autofocus> element not being focused (screenshot test report).

This PR adds a [ponyfill](https://github.com/sindresorhus/ponyfill) for `autofocus` to `test/screenshot/fixture.js` as a workaround for [Edge platform issue #101198](https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/101198/):

> Autofocusing does not work on first page load. Autofocusing works only after reloading the page (either by pressing <kbd>F5</kbd> key, or by clicking `Refresh` button, or by focusing location bar and pressing <kbd>Enter</kbd> again), so effectively autofocus does not work at all.

This was supposedly fixed in Edge 15, but in PR #3496, the first screenshot fails 100% of the time in Edge 17 due to a `<select autofocus>` element not being focused ([screenshot test report](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/02/19_24_47_468/report/report.html)).
@mdc-web-bot
Copy link
Collaborator

All 357 screenshot tests passed for commit f1c2fe3 vs. master! 💯🎉

@acdvorak acdvorak merged commit cc765bd into master Sep 2, 2018
@acdvorak acdvorak deleted the chore/infra/autofocus branch September 2, 2018 21:22
adrianschmidt pushed a commit to Lundalogik/material-components-web that referenced this pull request Sep 25, 2018
…mponents#3498)

This PR adds a [ponyfill](https://github.com/sindresorhus/ponyfill) for `autofocus` to `test/screenshot/fixture.js` as a workaround for [Edge platform issue #101198](https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/101198/):

> Autofocusing does not work on first page load. Autofocusing works only after reloading the page (either by pressing <kbd>F5</kbd> key, or by clicking `Refresh` button, or by focusing location bar and pressing <kbd>Enter</kbd> again), so effectively autofocus does not work at all.

This was supposedly fixed in Edge 15, but in PR material-components#3496, the first screenshot fails 100% of the time in Edge 17 due to a `<select autofocus>` element not being focused ([screenshot test report](https://storage.googleapis.com/mdc-web-screenshot-tests/advorak/2018/09/02/19_24_47_468/report/report.html)).

(cherry picked from commit cc765bd)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants