Remote right/left arrow input field behavior, so it consistently moves between
levels
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
--focus: #ff0000;
|
||||
--node: #4285f4;
|
||||
--group: #0f9d58;
|
||||
--link: #f4b400;
|
||||
--link: #dba100;
|
||||
--text: #ffffff;
|
||||
--border: #f5f5f5;
|
||||
--border: #e3e3e3;
|
||||
--placeholder: #bbbbbb;
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -79,7 +80,7 @@ body {
|
||||
}
|
||||
|
||||
.editor li input::-webkit-input-placeholder {
|
||||
color: var(--border);
|
||||
color: var(--placeholder);
|
||||
}
|
||||
|
||||
.editor li input:focus {
|
||||
|
||||
31
architype.js
31
architype.js
@@ -381,14 +381,6 @@ class Node extends EditorEntryBase {
|
||||
this.stopEdit();
|
||||
break;
|
||||
|
||||
case 'ArrowLeft':
|
||||
e.stopPropagation();
|
||||
if (this.input_.selectionEnd == 0) {
|
||||
e.preventDefault();
|
||||
this.stopEdit();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
e.stopPropagation();
|
||||
break;
|
||||
@@ -404,13 +396,6 @@ class Node extends EditorEntryBase {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
break;
|
||||
|
||||
case 'ArrowRight':
|
||||
this.startEdit();
|
||||
this.input_.selectionEnd = 0;
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,14 +463,6 @@ class Group extends EditorEntryBase {
|
||||
this.stopEdit();
|
||||
break;
|
||||
|
||||
case 'ArrowLeft':
|
||||
e.stopPropagation();
|
||||
if (this.input_.selectionEnd == 0) {
|
||||
e.preventDefault();
|
||||
this.stopEdit();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
e.stopPropagation();
|
||||
break;
|
||||
@@ -572,14 +549,6 @@ class Link extends EditorEntryBase {
|
||||
this.stopEdit();
|
||||
break;
|
||||
|
||||
case 'ArrowLeft':
|
||||
e.stopPropagation();
|
||||
if (this.input_.selectionEnd == 0) {
|
||||
e.preventDefault();
|
||||
this.stopEdit();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
e.stopPropagation();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user