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

Select value is highlighted in IE on focus #3496

Closed
acdvorak opened this issue Sep 2, 2018 · 0 comments
Closed

Select value is highlighted in IE on focus #3496

acdvorak opened this issue Sep 2, 2018 · 0 comments
Labels

Comments

@acdvorak
Copy link
Contributor

acdvorak commented Sep 2, 2018

What MDC Web Version are you using?

0.39.1

What browser(s) is this bug affecting?

IE 11 💩

What OS are you using?

Windows 10

What are the steps to reproduce the bug?

  1. View the mdc-select screenshot test page in IE 11

What is the expected behavior?

Select value should have black text and a transparent background when focused:

image

What is the actual behavior?

Select value has white text (#ffffff) and a blue background (#3a9bfc) when focused:

image

Sometimes, just for fun, IE renders a slightly darker blue (#137ad4):

image

Any other information you believe would be useful?

The flaky blue background color (#3a9bfc vs. #137ad4 on an Apple Thunderbolt Display)
causes spurious screenshot diffs. E.g.:

Fixing it should be as simple as:

.mdc-select__native-control::-ms-value {
  background-color: transparent;
  color: inherit;
}
@acdvorak acdvorak added the bug label Sep 2, 2018
acdvorak added a commit that referenced this issue Sep 2, 2018
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)).
acdvorak added a commit that referenced this issue Sep 2, 2018
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)).
adrianschmidt pushed a commit to Lundalogik/material-components-web that referenced this issue 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)
adrianschmidt pushed a commit to Lundalogik/material-components-web that referenced this issue Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant