Skip to content

Commit

Permalink
fix selection of combobox in autostyler dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Nov 3, 2024
1 parent cbfdd99 commit 0ff477e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/ide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2356,8 +2356,8 @@ class IDE {
$("#styler-dialog input[name=attribute]"),
Object.keys(allTags)
);
function checkTag() {
const key = $("#styler-dialog input[type=text]").first().val();
function checkTag(key?) {
key = key || $("#styler-dialog input[type=text]").first().val();
if (allTags[key] !== undefined) {
$("#styler-dialog button.is-success").removeAttr("disabled");
return true;
Expand All @@ -2379,7 +2379,8 @@ class IDE {
})
.unbind("input")
.bind("input", checkTag)
.on("autocompleteselect", checkTag)
.unbind("autocompleteselect")
.bind("autocompleteselect", (_, ui) => checkTag(ui.item.value))
.focus();
}
onStylerRun() {
Expand Down

0 comments on commit 0ff477e

Please sign in to comment.