File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,7 +272,8 @@ the specific language governing permissions and limitations under the Apache Lic
272272
273273 /* make sure el received focus so we do not error out when trying to manipulate the caret.
274274 sometimes modals or others listeners may steal it after its set */
275- if ( $el . is ( ":visible" ) && el === document . activeElement ) {
275+ var isVisible = ( el . offsetWidth > 0 || el . offsetHeight > 0 ) ;
276+ if ( isVisible && el === document . activeElement ) {
276277
277278 /* after the focus is set move the caret to the end, necessary when we val()
278279 just before setting focus */
@@ -1453,7 +1454,7 @@ the specific language governing permissions and limitations under the Apache Lic
14531454
14541455 // abstract
14551456 findHighlightableChoices : function ( ) {
1456- return this . results . find ( ".select2-result-selectable:not(.select2-disabled, .select2-selected)" ) ;
1457+ return this . results . find ( ".select2-result-selectable:not(.select2-disabled):not( .select2-selected)" ) ;
14571458 } ,
14581459
14591460 // abstract
You can’t perform that action at this time.
0 commit comments