File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
content/patterns/combobox/examples/js Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ Select.prototype.init = function () {
195
195
196
196
// add event listeners
197
197
this . comboEl . addEventListener ( 'blur' , this . onComboBlur . bind ( this ) ) ;
198
+ this . listboxEl . addEventListener ( 'focusout' , this . onComboBlur . bind ( this ) ) ;
198
199
this . comboEl . addEventListener ( 'click' , this . onComboClick . bind ( this ) ) ;
199
200
this . comboEl . addEventListener ( 'keydown' , this . onComboKeyDown . bind ( this ) ) ;
200
201
@@ -239,10 +240,9 @@ Select.prototype.getSearchString = function (char) {
239
240
return this . searchString ;
240
241
} ;
241
242
242
- Select . prototype . onComboBlur = function ( ) {
243
- // do not do blur action if ignoreBlur flag has been set
244
- if ( this . ignoreBlur ) {
245
- this . ignoreBlur = false ;
243
+ Select . prototype . onComboBlur = function ( event ) {
244
+ // do nothing if relatedTarget is contained within listboxEl
245
+ if ( this . listboxEl . contains ( event . relatedTarget ) ) {
246
246
return ;
247
247
}
248
248
You can’t perform that action at this time.
0 commit comments