Browse Source

HUE-2354 [sentry] Cannot edit URI by modifying input directly

Added blur handler on filechoose and hivechooser bindings
Enrico Berti 11 years ago
parent
commit
7dc2c4a969
1 changed files with 9 additions and 0 deletions
  1. 9 0
      apps/security/static/js/common.ko.js

+ 9 - 0
apps/security/static/js/common.ko.js

@@ -109,6 +109,10 @@ ko.bindingHandlers.hivechooser = {
       self.blur();
     }
 
+    self.on("blur", function () {
+      valueAccessor()(self.val());
+    });
+
     self.jHueHiveAutocomplete({
       skipColumns: true,
       showOnFocus: true,
@@ -133,6 +137,11 @@ ko.bindingHandlers.filechooser = {
   init: function(element, valueAccessor, allBindingsAccessor, vm) {
     var self = $(element);
     self.val(valueAccessor()());
+
+    self.on("blur", function () {
+      valueAccessor()(self.val());
+    });
+
     self.after(getFileBrowseButton(self, true, valueAccessor));
   }
 };