Commit a20936d
committed
Fix invalid selector in hotkey query
Using string concatentation with user controlled input to build a
selector query results in syntax errors.
> SyntaxError: Failed to execute 'querySelector' on 'Element': '[hotkey="""]' is not a valid selector.
Instead, query potential hotkey buttons and test their attribute against
the event's key value.1 parent a561e30 commit a20936d
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
366 | 375 | | |
367 | 376 | | |
368 | | - | |
| 377 | + | |
369 | 378 | | |
370 | 379 | | |
371 | 380 | | |
| |||
0 commit comments