From 61b2957124c02b1125d0f3398f447a604b248f68 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 9 Feb 2016 21:30:47 +0000 Subject: [PATCH] Keep focus when selecting from the option list --- etemplate/js/et2_widget_taglist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index 328c7de8db..ab906daf7f 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -208,7 +208,9 @@ var et2_taglist = et2_selectbox.extend( // Display / hide a loading icon while fetching $j(this.taglist) .on("beforeload", function() {this.container.prepend('
');}) - .on("load", function() {$j('.loading',this.container).remove();}); + .on("load", function() {$j('.loading',this.container).remove();}) + // Keep focus when selecting from the list + .on("selectionchange", function() { $j('input',this.container).focus();}); // Unbind change handler of widget's ancestor to stop it from bubbling // taglist has its own onchange