File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
src/main/resources/META-INF/resources/primefaces/core Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 409409 else {
410410 var elements = $ ( selector ) ,
411411 firstElement = elements . eq ( 0 ) ;
412- if ( firstElement . is ( ':radio' ) ) {
413- var checkedRadio = $ ( ':radio[name="' + firstElement . attr ( 'name' ) + '"]' ) . filter ( ':checked' ) ;
414- if ( checkedRadio . length )
415- PrimeFaces . focusElement ( checkedRadio ) ;
416- else
417- PrimeFaces . focusElement ( firstElement ) ;
418- }
419- else {
420- firstElement . focus ( ) ;
421- }
412+ PrimeFaces . focusElement ( firstElement ) ;
422413 }
423414 } , 50 ) ;
424415
428419 } ,
429420
430421 focusElement : function ( el ) {
431- if ( el . is ( ':radio' ) && el . hasClass ( 'ui-helper-hidden-accessible' ) ) {
432- el . parent ( ) . focus ( ) ;
422+ if ( el . is ( ':radio' ) ) {
423+ // github issue: #2582
424+ if ( el . hasClass ( 'ui-helper-hidden-accessible' ) ) {
425+ el . parent ( ) . focus ( ) ;
426+ }
427+ else {
428+ var checkedRadio = $ ( ':radio[name="' + el . attr ( 'name' ) + '"]' ) . filter ( ':checked' ) ;
429+ if ( checkedRadio . length )
430+ checkedRadio . focus ( ) ;
431+ else
432+ el . focus ( ) ;
433+ }
433434 }
434435 else {
435436 el . focus ( ) ;
You can’t perform that action at this time.
0 commit comments