Keep focus when selecting from the option list

This commit is contained in:
Nathan Gray 2016-02-09 21:30:47 +00:00
parent d2e34a5812
commit 61b2957124

View File

@ -208,7 +208,9 @@ var et2_taglist = et2_selectbox.extend(
// Display / hide a loading icon while fetching // Display / hide a loading icon while fetching
$j(this.taglist) $j(this.taglist)
.on("beforeload", function() {this.container.prepend('<div class="ui-icon loading"/>');}) .on("beforeload", function() {this.container.prepend('<div class="ui-icon loading"/>');})
.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 // Unbind change handler of widget's ancestor to stop it from bubbling
// taglist has its own onchange // taglist has its own onchange