From 3b4e09e53afe057bd50ad6d063af43810adfd66b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 20 Sep 2018 07:42:43 +0200 Subject: [PATCH] Fix the removal of components on layer name editing --- src/navigator/view/ItemView.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js index 10f492ecb..d2c2e9b01 100644 --- a/src/navigator/view/ItemView.js +++ b/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); }, /**