Don't capture ctrl+a if currently in a text field.
This commit is contained in:
parent
4491fa3b5a
commit
a12d8cada1
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
var INPUT_TYPES = new Set(["INPUT", "TEXTAREA"]);
|
||||
|
||||
function create_message_bubble(message_area, message_positivity, message_text, lifespan)
|
||||
{
|
||||
if (lifespan === undefined)
|
||||
|
|
|
@ -167,6 +167,10 @@ function set_keybinds()
|
|||
{
|
||||
window.addEventListener("keydown", function(event)
|
||||
{
|
||||
if (INPUT_TYPES.has(event.target.tagName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (event.key == "a" && event.ctrlKey)
|
||||
{
|
||||
select_all_photos();
|
||||
|
|
Loading…
Reference in a new issue