mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Remove image click event handler, as it never takes place
* className of fields will be "field clearfix", never just "field"
This commit is contained in:
parent
e91a4b4362
commit
2946843b81
1 changed files with 0 additions and 14 deletions
|
@ -606,17 +606,3 @@ let filterNode = function (node: Node, extendedMode: boolean): void {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("click", (evt: MouseEvent): void => {
|
||||
const src = evt.target as Element;
|
||||
if (src.tagName === "IMG") {
|
||||
// image clicked; find contenteditable parent
|
||||
let p = src;
|
||||
while ((p = p.parentNode as Element)) {
|
||||
if (p.className === "field") {
|
||||
document.getElementById(p.id).focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue