Skip to content

Commit 83fc231

Browse files
author
Graham Butler
committed
Add form reset support
1 parent c0b26b8 commit 83fc231

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@author.io/element-menu",
3-
"version": "1.0.16",
3+
"version": "1.0.17",
44
"description": "author-menu custom element (web component).",
55
"main": "dist/author-menu.min.js",
66
"scripts": {

src/element.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ class AuthorMenuElement extends AuthorBaseElement(HTMLElement) {
329329

330330
this.PRIVATE.sourceForm = sourceElement.form
331331

332+
if (this.PRIVATE.sourceForm !== null) {
333+
this.UTIL.registerListeners(this.PRIVATE.sourceForm, {
334+
reset: evt => this.deselectAll()
335+
})
336+
}
337+
332338
this.UTIL.defineProperty('sourceElement', {
333339
readonly: true,
334340
default: sourceElement

0 commit comments

Comments
 (0)