FIX: double click on tag INPUT breaking expected behavior (#30975)

Double clicking on the INPUT for tag entry
was cause the INPUT to be selected but the
actual tag entry and lookup to be hidden

This adds special case handling
This commit is contained in:
Sam 2025-01-25 05:36:35 +11:00 committed by GitHub
parent 5a94ceda54
commit 9cc99ef6db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,8 +76,14 @@ export default class SelectKitHeader extends Component.extend(UtilsMixin) {
) { ) {
return false; return false;
} }
// When users double click on a tag input we want to leave it open
const hasInput =
event.target.tagName === "INPUT" || event.target.querySelector("input");
if (!this.selectKit.isExpanded || !hasInput) {
this.selectKit.toggle(event); this.selectKit.toggle(event);
} }
}
keyUp(event) { keyUp(event) {
if (event.key === " ") { if (event.key === " ") {