Fix inline editor

This fixes an issue where you saved a change but then deleted it.
But then you decided to edit the same file again, this resulted in
it restoring from the cache.

Another example is editing a file then restoring it to it's previous state.
Because it was cached it would restore it from the cache which is not
was supposed to be happening.

The cause of this was eraseEditableContentItem missing a call to
_getEditableContentKey.

Bug: Issue 10371
Change-Id: I47e4ca216804f0a86b1cec4ac549bb0599e17cb2
(cherry picked from commit 621d8b3457)
This commit is contained in:
Paladox none 2019-01-24 01:26:49 +00:00
parent 9f890ef777
commit 2f864ddee3
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@
},
eraseEditableContentItem(key) {
this._storage.removeItem(key);
this._storage.removeItem(this._getEditableContentKey(key));
},
getPreferences() {

View File

@ -188,7 +188,7 @@ limitations under the License.
// eraseEditableContentItem performs as expected.
element.eraseEditableContentItem(key);
assert.isNotOk(element._storage.getItem(key));
assert.isNotOk(element._storage.getItem(computedKey));
});
});
</script>