Remove code which supposedly fixing focus, but which is not functional

This commit is contained in:
Henrik Giesel 2021-01-19 02:54:15 +01:00
parent 47d26126e7
commit 27a1e81088

View File

@ -210,10 +210,6 @@ function onFocus(elem: HTMLElement): void {
currentField = elem;
pycmd(`focus:${currentFieldOrdinal()}`);
enableButtons();
// don't adjust cursor on mouse clicks
if (mouseDown) {
return;
}
// do this twice so that there's no flicker on newer versions
caretToEnd();
// scroll if bottom of element off the screen
@ -622,13 +618,6 @@ let adjustFieldsTopMargin = function (): void {
let mouseDown = 0;
$(function (): void {
document.body.addEventListener("mousedown", (): void => {
mouseDown++;
});
document.body.addEventListener("mouseup", (): void => {
mouseDown--;
});
document.addEventListener("click", (evt: MouseEvent): void => {
const src = evt.target as Element;
if (src.tagName === "IMG") {