jsdialog: avoid duplicated uno command execution in dropdowns

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id74f2149d2dac2c5c70f9c74b8eedb27b377d5eb
pull/8668/head
Szymon Kłos 2024-03-28 10:09:44 +01:00 committed by Szymon Kłos
parent 3444b0b940
commit 46b49afc2a
1 changed files with 3 additions and 1 deletions

View File

@ -132,8 +132,10 @@ JSDialog.OpenDropdown = function (id, popupParent, entries, innerCallback, popup
if (focusables && focusables.length)
focusables[0].focus();
} else if (eventType === 'selected' && entry.uno) {
L.Map.THIS.sendUnoCommand(entry.uno);
var uno = (entry.uno.indexOf('.uno:') === 0) ? entry.uno : '.uno:' + entry.uno;
L.Map.THIS.sendUnoCommand(uno);
JSDialog.CloseDropdown(id);
return;
}
} else if (!lastSubMenuOpened && eventType === 'hidedropdown') {
JSDialog.CloseDropdown(id);