mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Fix issue with pressing spacebar in select modes
This commit is contained in:
@@ -34,6 +34,12 @@ export function behaviorSelect(context) {
|
||||
|
||||
function keydown() {
|
||||
|
||||
if (d3_event.keyCode === 32) {
|
||||
// don't react to spacebar events during text input
|
||||
var activeNode = document.activeElement;
|
||||
if (activeNode && new Set(['INPUT', 'TEXTAREA']).has(activeNode.nodeName)) return;
|
||||
}
|
||||
|
||||
if (d3_event.keyCode === 93 || // context menu key
|
||||
d3_event.keyCode === 32) { // spacebar
|
||||
d3_event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user