Commit 515885c4 authored by yann300's avatar yann300

fix renaming file

parent 69aea682
...@@ -240,8 +240,6 @@ function fileExplorer (appAPI, files) { ...@@ -240,8 +240,6 @@ function fileExplorer (appAPI, files) {
function cancelRename () { function cancelRename () {
label.innerText = textUnderEdit label.innerText = textUnderEdit
label.removeAttribute('contenteditable')
label.classList.remove(css.rename)
} }
if (event.which === 13) event.preventDefault() if (event.which === 13) event.preventDefault()
...@@ -251,6 +249,8 @@ function fileExplorer (appAPI, files) { ...@@ -251,6 +249,8 @@ function fileExplorer (appAPI, files) {
if (save && event.which !== 13) { if (save && event.which !== 13) {
modalDialogCustom.confirm(null, `Do you want to rename?`, () => { rename() }, () => { cancelRename() }) modalDialogCustom.confirm(null, `Do you want to rename?`, () => { rename() }, () => { cancelRename() })
} }
label.removeAttribute('contenteditable')
label.classList.remove(css.rename)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment