Skip to content

Commit

Permalink
Add istanbul-ignore comments for some workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Sep 13, 2018
1 parent 211fef4 commit dfc201a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vaadin-text-field-mixin.html
Expand Up @@ -306,6 +306,7 @@
this._errorId = `${this.constructor.is}-error-${uniqueId}`;
this._labelId = `${this.constructor.is}-label-${uniqueId}`;

/* istanbul ignore if */
if (navigator.userAgent.match(/Trident/)) {
this._addIEListeners();
}
Expand Down Expand Up @@ -354,6 +355,7 @@
attributeChangedCallback(prop, oldVal, newVal) {
super.attributeChangedCallback(prop, oldVal, newVal);
// Needed until Edge has CSS Custom Properties (present in Edge Preview)
/* istanbul ignore if */
if (!(window.ShadyCSS && window.ShadyCSS.nativeCss) &&
/^(focused|focus-ring|invalid|disabled|placeholder|has-value)$/.test(prop)) {
this.updateStyles();
Expand All @@ -362,6 +364,7 @@
// Safari has an issue with repainting shadow root element styles when a host attribute changes.
// Need this workaround (toggle any inline css property on and off) until the issue gets fixed.
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
/* istanbul ignore if */
if (isSafari && this.root) {
const WEBKIT_PROPERTY = '-webkit-backface-visibility';
this.root.querySelectorAll('*').forEach(el => {
Expand Down

0 comments on commit dfc201a

Please sign in to comment.