Bug 1930588 - Set agenda selection on modification only when the item was already selected. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D228626 --HG-- extra : rebase_source : 168230b9996d35ebc78aaacc88ea80ccacddea93 extra : amend_source : 96cb1fbb983f84a2ae404c6e24109ee02e5ec173
This commit is contained in:
Родитель
12bec516ed
Коммит
4971d003a8
|
@ -85,6 +85,8 @@
|
|||
while (this.lastChild) {
|
||||
this.lastChild.remove();
|
||||
}
|
||||
|
||||
delete this._lastRemovedID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -108,6 +110,8 @@
|
|||
setTimeout(() => (this.selectedIndex = this.rows.indexOf(startItem)));
|
||||
}
|
||||
}
|
||||
|
||||
delete this._lastRemovedID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,6 +120,8 @@
|
|||
* @param {calIItemBase[]} items
|
||||
*/
|
||||
removeItems(items) {
|
||||
delete this._lastRemovedID;
|
||||
|
||||
for (const item of items) {
|
||||
const startItem = document.getElementById(`agenda-listitem-${item.hashId}`);
|
||||
if (!startItem) {
|
||||
|
@ -124,7 +130,9 @@
|
|||
}
|
||||
|
||||
this.removeListItem(startItem);
|
||||
this._lastRemovedID = startItem.id;
|
||||
if (this.selectedRow == startItem) {
|
||||
this._lastRemovedID = startItem.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,6 +150,8 @@
|
|||
li.remove();
|
||||
}
|
||||
}
|
||||
|
||||
delete this._lastRemovedID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче