Index: Source/devtools/front_end/DOMStorageItemsView.js |
diff --git a/Source/devtools/front_end/DOMStorageItemsView.js b/Source/devtools/front_end/DOMStorageItemsView.js |
index 908ba8bcb2004ff8d7a3841612b7e213dca985d9..f4a9d621979f3b0e813fe31f765c85d5dbd32ba4 100644 |
--- a/Source/devtools/front_end/DOMStorageItemsView.js |
+++ b/Source/devtools/front_end/DOMStorageItemsView.js |
@@ -119,9 +119,13 @@ WebInspector.DOMStorageItemsView.prototype = { |
if (childNode.data.key === storageData.key) { |
rootNode.removeChild(childNode); |
this.deleteButton.visible = (children.length > 1); |
- return; |
+ break; |
} |
} |
+ if (this._setItem) { |
+ this._setItem(); |
+ delete this._setItem; |
+ } |
}, |
/** |
@@ -246,9 +250,11 @@ WebInspector.DOMStorageItemsView.prototype = { |
{ |
var domStorage = this.domStorage; |
if ("key" === columnIdentifier) { |
- if (typeof oldText === "string") |
+ if (typeof oldText === "string") { |
domStorage.removeItem(oldText); |
- domStorage.setItem(newText, editingNode.data.value || ''); |
+ this._setItem = domStorage.setItem.bind(domStorage, newText, editingNode.data.value || ''); |
+ } else |
+ domStorage.setItem(newText, editingNode.data.value || ''); |
this._removeDupes(editingNode); |
} else |
domStorage.setItem(editingNode.data.key || '', newText); |