File adding support, editor enhancements, JS improved.
This commit is contained in:
parent
50b377d08c
commit
81dc74a175
4 changed files with 83 additions and 41 deletions
|
@ -99,7 +99,11 @@ class ActionsClass {
|
|||
inputField.focus();
|
||||
inputField.on('blur keypress', e => {
|
||||
// Save Field
|
||||
if (e.type === 'blur' || (e.type === 'keypress' && e.which === 27) || currentName === inputField.val()) {
|
||||
if (
|
||||
(e.type === 'keypress' && e.which === 27)
|
||||
|| e.type === 'blur'
|
||||
|| (e.type === 'keypress' && e.which === 13 && currentName === inputField.val())
|
||||
) {
|
||||
if (!_.isEmpty(currentLink)) {
|
||||
nameBlock.html(currentLink);
|
||||
} else {
|
||||
|
@ -110,6 +114,10 @@ class ActionsClass {
|
|||
return;
|
||||
}
|
||||
|
||||
if (e.type === 'keypress' && e.which !== 13) return;
|
||||
|
||||
console.log('did not');
|
||||
|
||||
inputLoader.show();
|
||||
const currentPath = decodeURIComponent(nameBlock.data('path'));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue