mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Focus special handling of Shift+Tab on macOS
This commit is contained in:
parent
165007180a
commit
2ae4d14bc5
1 changed files with 0 additions and 16 deletions
|
@ -54,12 +54,6 @@ function onKey(evt: KeyboardEvent) {
|
||||||
currentField.blur();
|
currentField.blur();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// shift+tab goes to previous field
|
|
||||||
if (navigator.platform === "MacIntel" && evt.which === 9 && evt.shiftKey) {
|
|
||||||
evt.preventDefault();
|
|
||||||
focusPrevious();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// fix Ctrl+right/left handling in RTL fields
|
// fix Ctrl+right/left handling in RTL fields
|
||||||
if (currentField.dir === "rtl") {
|
if (currentField.dir === "rtl") {
|
||||||
|
@ -206,16 +200,6 @@ function focusField(n) {
|
||||||
$("#f" + n).focus();
|
$("#f" + n).focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function focusPrevious() {
|
|
||||||
if (!currentField) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const previous = currentFieldOrdinal() - 1;
|
|
||||||
if (previous >= 0) {
|
|
||||||
focusField(previous);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function focusIfField(x, y) {
|
function focusIfField(x, y) {
|
||||||
const elements = document.elementsFromPoint(x, y);
|
const elements = document.elementsFromPoint(x, y);
|
||||||
for (let i = 0; i < elements.length; i++) {
|
for (let i = 0; i < elements.length; i++) {
|
||||||
|
|
Loading…
Reference in a new issue