Bug 1875354 - Don't create an unnecessary user activation from select when not firing the input event. r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D214933
This commit is contained in:
Tom Schuster 2024-07-11 09:12:57 +00:00
Родитель a08d6a67a0
Коммит 35ac0fc195
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -259,11 +259,10 @@ SelectContentHelper.prototype = {
// Fire input and change events when selected option changes
{
let handlingUserInput = win.windowUtils.setHandlingUserInput(true);
let changed = this.initialSelection !== selectedOption;
let handlingUserInput = win.windowUtils.setHandlingUserInput(changed);
try {
element.userFinishedInteracting(
this.initialSelection !== selectedOption
);
element.userFinishedInteracting(changed);
} finally {
handlingUserInput.destruct();
}