Browse Source

Fix the removal of components on layer name editing

pull/1446/head
Artur Arseniev 8 years ago
parent
commit
3b4e09e53a
  1. 4
      src/navigator/view/ItemView.js

4
src/navigator/view/ItemView.js

@ -132,9 +132,11 @@ module.exports = Backbone.View.extend({
*/
handleEdit(e) {
e && e.stopPropagation();
const em = this.em;
const inputEl = this.getInputName();
inputEl[inputProp] = true;
inputEl.focus();
em && em.setEditing(1);
},
/**
@ -142,10 +144,12 @@ module.exports = Backbone.View.extend({
*/
handleEditEnd(e) {
e && e.stopPropagation();
const em = this.em;
const inputEl = this.getInputName();
const name = inputEl.textContent;
inputEl[inputProp] = false;
this.model.set({ name });
em && em.setEditing(1);
},
/**

Loading…
Cancel
Save