Merge pull request #859 from hgiesel/tabindex2

Consider removing special handling of Shift+Tab in Editor on macOS
This commit is contained in:
Damien Elmes 2020-12-21 18:38:35 +10:00 committed by GitHub
commit c18ea8ef78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,12 +54,6 @@ function onKey(evt: KeyboardEvent) {
currentField.blur();
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
if (currentField.dir === "rtl") {
@ -206,16 +200,6 @@ function focusField(n) {
$("#f" + n).focus();
}
function focusPrevious() {
if (!currentField) {
return;
}
const previous = currentFieldOrdinal() - 1;
if (previous >= 0) {
focusField(previous);
}
}
function focusIfField(x, y) {
const elements = document.elementsFromPoint(x, y);
for (let i = 0; i < elements.length; i++) {