fix Ctrl+A (#814)
This commit is contained in:
parent
497c6ae017
commit
154257d062
1 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,8 @@ const Listeners = {
|
|||
$(document).on('keydown', function (e) {
|
||||
if (!(Active.Map || Active.Topic)) return
|
||||
|
||||
const onCanvas = e.target.tagName === 'BODY'
|
||||
|
||||
switch (e.which) {
|
||||
case 13: // if enter key is pressed
|
||||
// prevent topic creation if sending a message
|
||||
|
@ -28,7 +30,7 @@ const Listeners = {
|
|||
JIT.escKeyHandler()
|
||||
break
|
||||
case 65: // if a or A is pressed
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
if ((e.ctrlKey || e.metaKey) && onCanvas) {
|
||||
Control.deselectAllNodes()
|
||||
Control.deselectAllEdges()
|
||||
|
||||
|
|
Loading…
Reference in a new issue