@lion/button
Advanced tools
Comparing version 0.8.10 to 0.8.11
# Change Log | ||
## 0.8.11 | ||
### Patch Changes | ||
- 33f639e8: Delay adding prevent event leakage handler by one frame. This is because it takes 1 frame longer for older browsers such as Firefox ESR 60, IE11 and old Edge to have the native form available as a property on the native button. | ||
## 0.8.10 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@lion/button", | ||
"version": "0.8.10", | ||
"version": "0.8.11", | ||
"description": "A button that is easily styleable and accessible in all contexts", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -39,3 +39,3 @@ declare const LionButton_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/SlotMixinTypes").SlotHost> & typeof import("@lion/core/types/SlotMixinTypes").SlotHost & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledWithTabIndexMixinTypes").DisabledWithTabIndexHost> & import("@open-wc/dedupe-mixin").Constructor<import("@lion/core/types/DisabledMixinTypes").DisabledHost>; | ||
*/ | ||
__clickDelegationHandler(ev: Event): void; | ||
__clickDelegationHandler(ev: Event): Promise<void>; | ||
__setupDelegationInConstructor(): void; | ||
@@ -42,0 +42,0 @@ __setupEvents(): void; |
@@ -193,3 +193,7 @@ import { | ||
this.__setupEvents(); | ||
this.__setupSubmitAndResetHelperOnConnected(); | ||
// Old browsers (IE11, Old Edge, Firefox ESR 60) don't have the `.form` | ||
// property defined immediately on the native button, so do this after first render on connected. | ||
this.updateComplete.then(() => { | ||
this.__setupSubmitAndResetHelperOnConnected(); | ||
}); | ||
} | ||
@@ -225,3 +229,8 @@ | ||
*/ | ||
__clickDelegationHandler(ev) { | ||
async __clickDelegationHandler(ev) { | ||
// Wait for updateComplete if form is not yet available | ||
if (!this._form) { | ||
await this.updateComplete; | ||
} | ||
if ((this.type === 'submit' || this.type === 'reset') && ev.target === this && this._form) { | ||
@@ -228,0 +237,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
76426
934