Fix MKWS-414.
authorMike Taylor <mike@indexdata.com>
Wed, 14 Oct 2015 11:30:57 +0000 (12:30 +0100)
committerMike Taylor <mike@indexdata.com>
Wed, 14 Oct 2015 11:30:57 +0000 (12:30 +0100)
Search-form widget now correctly passes the widget object into
team.newsearch, rather than the DOM object associated with it.

src/mkws-widget-main.js

index 2d47617..a21fd42 100644 (file)
@@ -286,9 +286,10 @@ mkws.registerWidgetType('search', function() {
 
 mkws.registerWidgetType('search-form', function() {
   var team = this.team;
+  var that = this;
   this.node.submit(function() {
     var val = team.widget('query').value();
-    team.newSearch(this, val);
+    team.newSearch(that, val);
     return false;
   });
 });