@vaadin/vaadin-control-state-mixin
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-control-state-mixin", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"main": "vaadin-control-state-mixin.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -36,3 +36,3 @@ /** | ||
*/ | ||
readonly focusElement: HTMLElement|null; | ||
readonly focusElement: Element|null|undefined; | ||
@@ -39,0 +39,0 @@ /** |
@@ -85,3 +85,3 @@ /** | ||
if (e.composedPath()[0] === this) { | ||
this._focus(e); | ||
this._focus(); | ||
} else if (e.composedPath().indexOf(this.focusElement) !== -1 && !this.disabled) { | ||
@@ -135,3 +135,3 @@ this._setFocused(true); | ||
fakeTarget.style.position = 'absolute'; | ||
fakeTarget.style.opacity = 0; | ||
fakeTarget.style.opacity = '0'; | ||
fakeTarget.tabIndex = this.tabIndex; | ||
@@ -224,3 +224,3 @@ | ||
* It returns the actual focusable element in the component. | ||
* @return {HTMLElement} | ||
* @return {Element | null | undefined} | ||
*/ | ||
@@ -236,3 +236,3 @@ get focusElement() { | ||
_focus() { | ||
if (this._isShiftTabbing) { | ||
if (!this.focusElement || this._isShiftTabbing) { | ||
return; | ||
@@ -264,2 +264,5 @@ } | ||
blur() { | ||
if (!this.focusElement) { | ||
return; | ||
} | ||
this.focusElement.blur(); | ||
@@ -266,0 +269,0 @@ this._setFocused(false); |
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
23889
323