@vaadin/field-base
Advanced tools
Comparing version 22.0.8 to 22.0.9
{ | ||
"name": "@vaadin/field-base", | ||
"version": "22.0.8", | ||
"version": "22.0.9", | ||
"publishConfig": { | ||
@@ -34,3 +34,3 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "^22.0.8", | ||
"@vaadin/component-base": "^22.0.9", | ||
"lit": "^2.0.0" | ||
@@ -43,3 +43,3 @@ }, | ||
}, | ||
"gitHead": "6b6a1e5262588ae0f0b056e133f196dc93177264" | ||
"gitHead": "56629dcfa0612f6cc5e91112505fc19d03144784" | ||
} |
@@ -34,3 +34,3 @@ /** | ||
* Override an event listener from `KeyboardMixin` | ||
* to prevent setting `focused` on Shift Tab. | ||
* to prevent focusing the host element on Shift Tab. | ||
* @param {KeyboardEvent} event | ||
@@ -43,9 +43,6 @@ * @protected | ||
// When focus moves with Shift + Tab, do not mark host as focused. | ||
// The flag set here will be later used in focusin event listener. | ||
// When focus moves with Shift + Tab, skip focusing the host element | ||
// by focusing it before the default browser focus handling runs | ||
if (!event.defaultPrevented && event.keyCode === 9 && event.shiftKey) { | ||
this._isShiftTabbing = true; | ||
HTMLElement.prototype.focus.apply(this); | ||
this._setFocused(false); | ||
setTimeout(() => (this._isShiftTabbing = false), 0); | ||
} | ||
@@ -66,9 +63,9 @@ } | ||
// When focus moves from outside and not with Shift + Tab, delegate it to focusElement. | ||
if (path[0] === this && !this.contains(event.relatedTarget) && !this._isShiftTabbing) { | ||
// When focus moves to the host element itself, then delegate it to the focusElement | ||
// This should only move focus when using keyboard navigation, for clicks we don't want to interfere, | ||
// for example when the user tries to select some text | ||
if (path[0] === this && this._keyboardActive) { | ||
this.focusElement.focus(); | ||
return true; | ||
} | ||
if (path.includes(this.focusElement)) { | ||
if (path[0] === this || path.includes(this.focusElement)) { | ||
return true; | ||
@@ -75,0 +72,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
111645
3091