Make jsdialogs capture keydown events in Impress

JSdialog popups on Impress would have the keydown events not captured.
The events would be handled by the main document.
Now they will be captured by the correct element.

Signed-off-by: Oli <oli.baker@collabora.com>
Change-Id: I543e25ddbcb1766cc677f7fbc6629e8d04a5b394
This commit is contained in:
Oli 2023-08-23 12:08:03 +01:00 committed by Andras Timar
parent ec17f72fb5
commit ba31ffb598

View file

@ -361,7 +361,7 @@ L.Map.Keyboard = L.Handler.extend({
ev.preventDefault();
return;
}
else if (this._map._docLayer._docType === 'presentation' || this._map._docLayer._docType === 'drawing' && this._map._docLayer._preview.partsFocused === true) {
else if ((this._map._docLayer._docType === 'presentation' || this._map._docLayer._docType === 'drawing') && this._map._docLayer._preview.partsFocused === true) {
if (!this.modifier && (ev.keyCode === this.keyCodes.DOWN || ev.keyCode === this.keyCodes.UP || ev.keyCode === this.keyCodes.RIGHT || ev.keyCode === this.keyCodes.LEFT
|| ev.keyCode === this.keyCodes.DELETE || ev.keyCode === this.keyCodes.BACKSPACE) && ev.type === 'keydown') {
var partToSelect = (ev.keyCode === this.keyCodes.UP || ev.keyCode === this.keyCodes.LEFT) ? 'prev' : 'next';