make sure we save field in all blur cases
https://anki.tenderapp.com/discussions/ankidesktop/32268-changes-in-editcurrent-and-addcards-not-taking-effect-when-using-mouse-rather-than-hotkey
This commit is contained in:
parent
6b24b61999
commit
de38313071
@ -207,15 +207,17 @@ function caretToEnd() {
|
||||
}
|
||||
|
||||
function onBlur() {
|
||||
if (document.activeElement === currentField) {
|
||||
// anki window defocused; current field unchanged
|
||||
return;
|
||||
}
|
||||
if (currentField) {
|
||||
saveField("blur");
|
||||
currentField = null;
|
||||
clearChangeTimer();
|
||||
}
|
||||
clearChangeTimer();
|
||||
|
||||
if (document.activeElement === currentField) {
|
||||
// other widget or window focused; current field unchanged
|
||||
return;
|
||||
}
|
||||
|
||||
currentField = null;
|
||||
disableButtons();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user