input-pill: Have all clicks directly on container focus input.

If a user clicks on the pill container and not directly on a pill
or on an "x" inside of a pill, it should be presumed they are
trying to input new text. This effectively makes the whole non-pill
section an input bar.
This commit is contained in:
Brock Whittaker
2017-10-24 11:33:18 -07:00
committed by Tim Abbott
parent 7b00736fa2
commit 93141cbe39

View File

@@ -254,6 +254,12 @@ var input_pill = function ($parent) {
funcs.removePill(id);
$next.focus();
});
store.$parent.on("click", function (e) {
if ($(e.target).is(".pill-container")) {
$(this).find(".input").focus();
}
});
}());
// the external, user-accessible prototype.