fix focus not moving from reader into contextPane (#4238)

If the header is in bibliography entry mode.

Instead of trying to focus editable-text of the header (which
may not be possible), just focus the next node after the header.
This commit is contained in:
abaevbog 2024-06-14 23:19:48 -05:00 committed by GitHub
parent d2fda98bcb
commit 2c74b0279d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -317,8 +317,9 @@
if (splitter.getAttribute('state') != 'collapsed') { if (splitter.getAttribute('state') != 'collapsed') {
if (this.mode == "item") { if (this.mode == "item") {
let header = this._itemPaneDeck.selectedPanel.querySelector("item-pane-header editable-text"); let header = this._itemPaneDeck.selectedPanel.querySelector("item-pane-header");
header.focus(); // Focus the first focusable node after header
Services.focus.moveFocus(window, header, Services.focus.MOVEFOCUS_FORWARD, 0);
return true; return true;
} }
else { else {