mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Remove d3 from keyboard.js
This commit is contained in:
parent
30ea300f65
commit
c24d7fafa9
@ -298,21 +298,21 @@ RED.keyboard = (function() {
|
|||||||
return resolveKeyEvent(evt);
|
return resolveKeyEvent(evt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d3.select(window).on("keydown",function() {
|
document.addEventListener("keydown", function(event) {
|
||||||
if (!handlersActive) {
|
if (!handlersActive) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (metaKeyCodes[d3.event.keyCode]) {
|
if (metaKeyCodes[event.keyCode]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var handler = resolveKeyEvent(d3.event);
|
var handler = resolveKeyEvent(event);
|
||||||
if (handler && handler.ondown) {
|
if (handler && handler.ondown) {
|
||||||
if (typeof handler.ondown === "string") {
|
if (typeof handler.ondown === "string") {
|
||||||
RED.actions.invoke(handler.ondown);
|
RED.actions.invoke(handler.ondown);
|
||||||
} else {
|
} else {
|
||||||
handler.ondown();
|
handler.ondown();
|
||||||
}
|
}
|
||||||
d3.event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user