File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,7 +264,8 @@ the specific language governing permissions and limitations under the Apache Lic
264264
265265 /* make sure el received focus so we do not error out when trying to manipulate the caret.
266266 sometimes modals or others listeners may steal it after its set */
267- if ( $el . is ( ":visible" ) && el === document . activeElement ) {
267+ var isVisible = ( el . offsetWidth > 0 || el . offsetHeight > 0 ) ;
268+ if ( isVisible && el === document . activeElement ) {
268269
269270 /* after the focus is set move the caret to the end, necessary when we val()
270271 just before setting focus */
@@ -1431,7 +1432,7 @@ the specific language governing permissions and limitations under the Apache Lic
14311432
14321433 // abstract
14331434 findHighlightableChoices : function ( ) {
1434- return this . results . find ( ".select2-result-selectable:not(.select2-disabled, .select2-selected)" ) ;
1435+ return this . results . find ( ".select2-result-selectable:not(.select2-disabled):not( .select2-selected)" ) ;
14351436 } ,
14361437
14371438 // abstract
You can’t perform that action at this time.
0 commit comments