Bug 1244462 set isContentSelected before using it for the on-build-contextmenu notification, r=gijs

This commit is contained in:
Shane Caraveo 2016-02-10 12:23:25 -08:00
Родитель 7438cce502
Коммит 2aa905d8b9
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -31,6 +31,7 @@ nsContextMenu.prototype = {
return;
this.hasPageMenu = false;
this.isContentSelected = !this.selectionInfo.docSelectionIsCollapsed;
if (!aIsShift) {
if (this.isRemote) {
this.hasPageMenu =
@ -71,6 +72,8 @@ nsContextMenu.prototype = {
Ci.nsIPrefLocalizedString).data;
} catch (e) { }
// Reset after "on-build-contextmenu" notification in case selection was
// changed during the notification.
this.isContentSelected = !this.selectionInfo.docSelectionIsCollapsed;
this.onPlainTextLink = false;