Bug 1720050 - Ensure to listen to transition events on <select>, not bubbled events from options. r=Gijs

Options can change styles for a variety of reasons and we don't want
transitions on them to re-update the whole menulist.

Differential Revision: https://phabricator.services.mozilla.com/D121353
This commit is contained in:
Emilio Cobos Álvarez 2021-07-30 15:59:15 +00:00
Родитель 640ce71da0
Коммит 982c820712
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -342,7 +342,10 @@ SelectContentHelper.prototype = {
}
break;
case "transitionend":
if (SUPPORTED_SELECT_PROPERTIES.includes(event.propertyName)) {
if (
this.element === event.target &&
SUPPORTED_SELECT_PROPERTIES.includes(event.propertyName)
) {
this._updateTimer.arm();
}
break;