Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
74b0ff2d
Commit
74b0ff2d
authored
Sep 29, 2017
by
holgerd77
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes false file-exists error message on file renaming
parent
70c7710b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
file-explorer.js
src/app/files/file-explorer.js
+5
-2
No files found.
src/app/files/file-explorer.js
View file @
74b0ff2d
...
...
@@ -128,6 +128,7 @@ function fileExplorer (appAPI, files) {
var
filepath
=
null
var
focusElement
=
null
var
textUnderEdit
=
null
var
textInRename
=
false
var
events
=
new
EventManager
()
this
.
events
=
events
...
...
@@ -243,14 +244,16 @@ function fileExplorer (appAPI, files) {
}
if
(
event
.
which
===
13
)
event
.
preventDefault
()
if
((
event
.
type
===
'blur'
||
event
.
which
===
27
||
event
.
which
===
13
)
&&
label
.
getAttribute
(
'contenteditable'
))
{
if
(
!
textInRename
&&
(
event
.
type
===
'blur'
||
event
.
which
===
27
||
event
.
which
===
13
)
&&
label
.
getAttribute
(
'contenteditable'
))
{
textInRename
=
true
var
isFolder
=
label
.
className
.
indexOf
(
'folder'
)
!==
-
1
var
save
=
textUnderEdit
!==
label
.
innerText
if
(
save
&&
event
.
which
!==
13
)
{
if
(
save
)
{
modalDialogCustom
.
confirm
(
null
,
`Do you want to rename?`
,
()
=>
{
rename
()
},
()
=>
{
cancelRename
()
})
}
label
.
removeAttribute
(
'contenteditable'
)
label
.
classList
.
remove
(
css
.
rename
)
textInRename
=
false
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment