From c09150dc354698901f156836d0316cf974822a85 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Mon, 4 May 2015 13:05:03 +0200 Subject: [PATCH] Bug 1160131 - editBookmarkOverlay.js throws an error when adding a tag to a bookmark. r=ttaubert --- browser/components/places/content/editBookmarkOverlay.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/components/places/content/editBookmarkOverlay.js b/browser/components/places/content/editBookmarkOverlay.js index 0dc8a69083a4..a06196d4ae4e 100644 --- a/browser/components/places/content/editBookmarkOverlay.js +++ b/browser/components/places/content/editBookmarkOverlay.js @@ -468,10 +468,14 @@ let gEditItemOverlay = { if (!anyChanges) return false; + // The panel could have been closed in the meanwhile. + if (!this._paneInfo) + return false; + // Ensure the tagsField is in sync, clean it up from empty tags currentTags = this._paneInfo.bulkTagging ? this._getCommonTags() : - PlacesUtils.tagging.getTagsForURI(this._uri); + PlacesUtils.tagging.getTagsForURI(this._paneInfo.uri); this._initTextField(this._tagsField, currentTags.join(", "), false); return true; }),