kelciour / edit-field-during-review

3 stars 1 forks source link

Not saving changes #5

Closed mjuzikfrik closed 5 years ago

mjuzikfrik commented 5 years ago

Hello,

I can edit all the fields fine, but neither hitting escape button nor clicking somewhere else saves what I changed. It happens with my deck, but not with basic anki temple for some reason. I'm attaching the deck in question for reference.

https://drive.google.com/file/d/1v5vQC8QP7BbAGJyzvK25fz4HttNhuv8W/view?usp=sharing

kelciour commented 5 years ago

Thanks for the report! As for now, please add the following code at the end of the back template to make it work again.

<script>
  $("[contenteditable=true][data-field]").blur(function() {
      pycmd("ankisave#" + $(this).data("field") + "#" + $(this).html());
  });
</script>

I hope I'll have the updated version of the add-on by the end of the week and this fix won't be needed.

mjuzikfrik commented 5 years ago

It does work indeed. Thank you!