From f5b02ccc216ea36489f6475e8ee0901952ff9630 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 28 Nov 2013 17:31:22 +0000 Subject: [PATCH] Preserve selected application when clearing search, or it gets lost internally --- etemplate/js/et2_widget_link.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index 20ca420c8e..34e680a670 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -666,7 +666,8 @@ var et2_link_entry = et2_inputWidget.extend( { // Clear self.search.autocomplete("close"); - self.set_value(""); + self.set_value({app: self.options.only_app || self.options.value.app || null, id: null}); + self.search.val(""); self.search.trigger("change"); } self.search.focus();