mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Remove code which supposedly fixing focus, but which is not functional
This commit is contained in:
parent
47d26126e7
commit
27a1e81088
1 changed files with 0 additions and 11 deletions
|
@ -210,10 +210,6 @@ function onFocus(elem: HTMLElement): void {
|
||||||
currentField = elem;
|
currentField = elem;
|
||||||
pycmd(`focus:${currentFieldOrdinal()}`);
|
pycmd(`focus:${currentFieldOrdinal()}`);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
// don't adjust cursor on mouse clicks
|
|
||||||
if (mouseDown) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// do this twice so that there's no flicker on newer versions
|
// do this twice so that there's no flicker on newer versions
|
||||||
caretToEnd();
|
caretToEnd();
|
||||||
// scroll if bottom of element off the screen
|
// scroll if bottom of element off the screen
|
||||||
|
@ -622,13 +618,6 @@ let adjustFieldsTopMargin = function (): void {
|
||||||
let mouseDown = 0;
|
let mouseDown = 0;
|
||||||
|
|
||||||
$(function (): void {
|
$(function (): void {
|
||||||
document.body.addEventListener("mousedown", (): void => {
|
|
||||||
mouseDown++;
|
|
||||||
});
|
|
||||||
document.body.addEventListener("mouseup", (): void => {
|
|
||||||
mouseDown--;
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener("click", (evt: MouseEvent): void => {
|
document.addEventListener("click", (evt: MouseEvent): void => {
|
||||||
const src = evt.target as Element;
|
const src = evt.target as Element;
|
||||||
if (src.tagName === "IMG") {
|
if (src.tagName === "IMG") {
|
||||||
|
|
Loading…
Reference in a new issue