From 5edd9b902a4355e2194d701cc71789bf44717847 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 1 Apr 2015 23:04:45 +0000 Subject: [PATCH] Add button type to et2_dropdown_buttons to stop default browser behaviour. Fixes filters get cleared when pressing enter in entryfilter --- etemplate/js/et2_widget_dropdown_button.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etemplate/js/et2_widget_dropdown_button.js b/etemplate/js/et2_widget_dropdown_button.js index 9dfd32b029..0972d2d07e 100644 --- a/etemplate/js/et2_widget_dropdown_button.js +++ b/etemplate/js/et2_widget_dropdown_button.js @@ -146,12 +146,14 @@ var et2_dropdown_button = et2_inputWidget.extend( // Left side - activates click action this.button = $j(document.createElement("button")) .attr("id", this.internal_ids.button) + .attr("type", "button") .addClass("ui-widget ui-corner-left").removeClass("ui-corner-all") .appendTo(this.buttons); // Right side - shows dropdown this.arrow = $j(document.createElement("button")) .addClass("ui-widget ui-corner-right").removeClass("ui-corner-all") + .attr("type", "button") .click(function() { // Clicking it again hides menu if(self.menu.is(":visible"))