Fix PDF reader keyboard navigation in RTL mode
This commit is contained in:
parent
3b8c16c155
commit
59caaf56ea
4 changed files with 7 additions and 4 deletions
|
@ -82,6 +82,7 @@ class ReaderInstance {
|
|||
sidebarWidth: this._sidebarWidth,
|
||||
sidebarOpen: this._sidebarOpen,
|
||||
bottomPlaceholderHeight: this._bottomPlaceholderHeight,
|
||||
rtl: Zotero.rtl,
|
||||
localizedStrings: {
|
||||
...Zotero.Intl.getPrefixedStrings('general.'),
|
||||
...Zotero.Intl.getPrefixedStrings('pdfReader.')
|
||||
|
|
|
@ -519,12 +519,14 @@ var ZoteroPane = new function()
|
|||
let itemPaneToggle = document.getElementById('zotero-tb-toggle-item-pane');
|
||||
let notesPaneToggle = document.getElementById('zotero-tb-toggle-notes-pane');
|
||||
// Using ArrowDown and ArrowUp to be consistent with pdf-reader
|
||||
if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {
|
||||
if (!Zotero.rtl && (event.key === 'ArrowRight' || event.key === 'ArrowDown')
|
||||
|| Zotero.rtl && (event.key === 'ArrowLeft' || event.key === 'ArrowUp')) {
|
||||
if (event.target === itemPaneToggle) {
|
||||
notesPaneToggle.focus();
|
||||
}
|
||||
}
|
||||
else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {
|
||||
else if (!Zotero.rtl && (event.key === 'ArrowLeft' || event.key === 'ArrowUp')
|
||||
|| Zotero.rtl && (event.key === 'ArrowRight' || event.key === 'ArrowDown')) {
|
||||
if (event.target === notesPaneToggle) {
|
||||
itemPaneToggle.focus();
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit a3f0ea4ac9077235fa4197a51375516072496a72
|
||||
Subproject commit 7690fdc9f78d65353215d48a71a1bf6e31f8c47d
|
|
@ -1 +1 @@
|
|||
Subproject commit cc517ae53bd849e7dc3a958b156552117d209e53
|
||||
Subproject commit 702fd99ca58801be27b25ee550331b9615f27184
|
Loading…
Reference in a new issue