-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix issue with widget not selecting place
The issue with the widget not selecting a place was due to the event listener on blur. The blur event was happening before the "combobox-commit" event which is the one that sets the place. A fix for this was to add event listener to the `mousedown` event instead of the `click` event in the combobox code. That was solved with a patch using `patch-package`. Also mentioned in this issue: github/combobox-nav#54 Also fixed an issue that showed "undefined" if selected place did not have a locality.
- Loading branch information
1 parent
39727ba
commit c19e940
Showing
13 changed files
with
584 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/node_modules/@github/combobox-nav/dist/index.js b/node_modules/@github/combobox-nav/dist/index.js | ||
index d86de71..3956688 100644 | ||
--- a/node_modules/@github/combobox-nav/dist/index.js | ||
+++ b/node_modules/@github/combobox-nav/dist/index.js | ||
@@ -34,7 +34,7 @@ export default class Combobox { | ||
this.input.addEventListener('compositionend', this.compositionEventHandler); | ||
this.input.addEventListener('input', this.inputHandler); | ||
this.input.addEventListener('keydown', this.keyboardEventHandler); | ||
- this.list.addEventListener('click', commitWithElement); | ||
+ this.list.addEventListener('mousedown', commitWithElement); | ||
this.indicateDefaultOption(); | ||
} | ||
stop() { | ||
@@ -44,7 +44,7 @@ export default class Combobox { | ||
this.input.removeEventListener('compositionend', this.compositionEventHandler); | ||
this.input.removeEventListener('input', this.inputHandler); | ||
this.input.removeEventListener('keydown', this.keyboardEventHandler); | ||
- this.list.removeEventListener('click', commitWithElement); | ||
+ this.list.removeEventListener('mousedown', commitWithElement); | ||
} | ||
indicateDefaultOption() { | ||
var _a; |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.