fnp
/
fnpeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
15f4c3b
)
simplify
author
Jan Szejko
<janek37@gmail.com>
Tue, 28 Feb 2017 14:58:45 +0000
(15:58 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Tue, 28 Feb 2017 14:58:45 +0000
(15:58 +0100)
src/editor/modules/documentCanvas/canvas/keyboard.js
patch
|
blob
|
history
diff --git
a/src/editor/modules/documentCanvas/canvas/keyboard.js
b/src/editor/modules/documentCanvas/canvas/keyboard.js
index
0871199
..
0ad2ff3
100644
(file)
--- a/
src/editor/modules/documentCanvas/canvas/keyboard.js
+++ b/
src/editor/modules/documentCanvas/canvas/keyboard.js
@@
-238,22
+238,16
@@
var keyEventHandlers = [
);
},
run: function(e,s) {
);
},
run: function(e,s) {
- var
direction, caretTo, cursorAtOperationEdge,
goto, element;
+ var goto, element;
if(e.key === KEYS.BACKSPACE) {
if(e.key === KEYS.BACKSPACE) {
- direction = 'above';
- caretTo = 'end';
- cursorAtOperationEdge = s.isAtBeginning(); // always true?
element = s.element;
}
else {
element = s.element;
}
else {
- direction = 'below';
- caretTo = 'start';
- cursorAtOperationEdge = s.isAtEnd(); // always true?
- element = cursorAtOperationEdge && s.canvas.getNearestTextElement(direction, s.element);
+ element = s.canvas.getNearestTextElement('below', s.element);
}
}
- if(!
cursorAtOperationEdge || !
element) {
+ if(!element) {
return;
}
return;
}