Focus filter input with a hotkey, adjust sizing
This commit is contained in:
@@ -8,6 +8,13 @@ export default class extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
focus(event) {
|
||||
if (this.#isClickable && !this.#shouldIgnore(event)) {
|
||||
event.preventDefault()
|
||||
this.element.focus()
|
||||
}
|
||||
}
|
||||
|
||||
#shouldIgnore(event) {
|
||||
return event.defaultPrevented || event.target.closest("input, textarea, lexxy-editor")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user