Skip to content

Commit

Permalink
Redirect focus to the tagger widget when labels are clicked that were…
Browse files Browse the repository at this point in the history
… for the original select
  • Loading branch information
Palmr committed Nov 19, 2015
1 parent 44e9f45 commit e0b28a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/jquery.tagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,11 @@
this._focusWidget();
this.taggerInput.focus();
}, this);
// Add a focus handler to any labels that are for the underlying select
$('label[for=' + this.element.prop('id') + ']').bind('mouseup', $.proxy(function () {
this._focusWidget();
this.taggerInput.focus();
}, this));
}

// Let the available tags be accessed through a nicer name
Expand Down

0 comments on commit e0b28a5

Please sign in to comment.