mind-tree-editor
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -1064,2 +1064,9 @@ import Menu from 'antd/es/menu'; | ||
onKeydown: function onKeydown(evt) { | ||
var target = evt.target; | ||
var tagName = target.tagName; // ignore: isContentEditable === 'true', <input> and <textarea> when readOnly state is false, <select> | ||
if (target.isContentEditable || (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') && !target.readOnly) { | ||
return; | ||
} | ||
var code = evt.keyCode; | ||
@@ -1066,0 +1073,0 @@ var graph = this.graph; |
@@ -1072,2 +1072,9 @@ 'use strict'; | ||
onKeydown: function onKeydown(evt) { | ||
var target = evt.target; | ||
var tagName = target.tagName; // ignore: isContentEditable === 'true', <input> and <textarea> when readOnly state is false, <select> | ||
if (target.isContentEditable || (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') && !target.readOnly) { | ||
return; | ||
} | ||
var code = evt.keyCode; | ||
@@ -1074,0 +1081,0 @@ var graph = this.graph; |
{ | ||
"name": "mind-tree-editor", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "mind editor", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -14,2 +14,14 @@ export default { | ||
onKeydown(evt) { | ||
const target = evt.target; | ||
const { tagName } = target; | ||
// ignore: isContentEditable === 'true', <input> and <textarea> when readOnly state is false, <select> | ||
if ( | ||
target.isContentEditable || | ||
((tagName === 'INPUT' || | ||
tagName === 'TEXTAREA' || | ||
tagName === 'SELECT') && | ||
!target.readOnly) | ||
) { | ||
return; | ||
} | ||
const code = evt.keyCode; | ||
@@ -16,0 +28,0 @@ const graph = this.graph; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
328263
4950
45