[GH-ISSUE #133] Escape key unfocuses textarea in Firefox #97

Closed
opened 2026-10-30 21:19:05 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Kenqr on GitHub (Mar 5, 2023).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/133

In Firefox, if you press escape key when focusing a textarea, it will lose focus.
I guess calling event.preventDefault() would fix this problem.

Originally created by @Kenqr on GitHub (Mar 5, 2023). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/133 In Firefox, if you press escape key when focusing a textarea, it will lose focus. I guess calling `event.preventDefault()` would fix this problem.
Author
Owner

@DominikDoom commented on GitHub (Mar 5, 2023):

As you can see here, this is already the case:
github.com/DominikDoom/a1111-sd-webui-tagcomplete@d1fff7bfa7/javascript/tagAutocomplete.js (L775)

Also, I can't reproduce what you said, it doesn't happen to me on Firefox 110.0.1 and stays focused after the window closes. As a matter of fact, I can't even get it to lose textbox focus at all by pressing escape, even if the completion window is closed.

<!-- gh-comment-id:1455089074 --> @DominikDoom commented on GitHub (Mar 5, 2023): As you can see here, this is already the case: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/blob/d1fff7bfa70bb58200464aa185b7ca8383538a17/javascript/tagAutocomplete.js#L775 Also, I can't reproduce what you said, it doesn't happen to me on Firefox 110.0.1 and stays focused after the window closes. As a matter of fact, I can't even get it to lose textbox focus at all by pressing escape, even if the completion window is closed.
Author
Owner

@Kenqr commented on GitHub (Mar 6, 2023):

Sorry, I think it is because I have Vimium installed.
Adding my webui URL to the excluded URL list solved the problem.

<!-- gh-comment-id:1455528273 --> @Kenqr commented on GitHub (Mar 6, 2023): Sorry, I think it is because I have Vimium installed. Adding my webui URL to the excluded URL list solved the problem.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#97
No description provided.