src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 562 643614f78c44
parent 561 a10e7b6fdb08
child 563 4816e3425933
--- a/src/js/widgets/createAnnotationWidget.js	Mon Jan 02 15:24:33 2012 +0100
+++ b/src/js/widgets/createAnnotationWidget.js	Mon Jan 02 15:27:32 2012 +0100
@@ -118,6 +118,9 @@
   if (contents === "") {
     textfield.after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template));
     textfield.css("background-color", "#d93c71");
+    
+    // use namespaced events to be able to unbind them quickly and without unbinding
+    // the other event handlers.
     textfield.bind("propertychange.tmp keyup.tmp input.tmp paste.tmp", IriSP.wrap(this, function() {
                     var contents = textfield.val();
                     console.log(contents);