webstaff: flat MARC editor now updates model on blur, not change
authorGalen Charlton <gmc@esilibrary.com>
Tue, 8 Sep 2015 20:44:00 +0000 (20:44 +0000)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 14 Sep 2015 19:44:21 +0000 (15:44 -0400)
This fixes a problem where attempting to type in the flat
MARC editor would result in a fromBreaker()/toBreaker() cycle
being run with each keystroke, which (among other things) made
the user have to fight for control of the insertion cursor.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2

index dd6932c..59596a5 100644 (file)
@@ -58,7 +58,7 @@
   </div>
 
   <div ng-show="flatEditor">
-    <textarea cols="120" rows="40" ng-model="flat_text_marc" ng-change="saveFlatTextMARC()"></textarea>
+    <textarea cols="120" rows="40" ng-model="flat_text_marc" ng-blur="saveFlatTextMARC()"></textarea>
   </div>
   <div ng-show="!flatEditor">
     <div class="row pad-vert">