mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
fix 'null' error when closing browser etc
This commit is contained in:
parent
d97c5f615f
commit
8f9a20c5a5
1 changed files with 4 additions and 0 deletions
|
|
@ -133,6 +133,10 @@ function onBlur() {
|
|||
};
|
||||
|
||||
function saveField(type) {
|
||||
if (!currentField) {
|
||||
// no field has been focused yet
|
||||
return;
|
||||
}
|
||||
// type is either 'blur' or 'key'
|
||||
py.run(type + ":" + currentField.innerHTML);
|
||||
clearChangeTimer();
|
||||
|
|
|
|||
Loading…
Reference in a new issue