@@ -69,29 +69,6 @@ define( [ "jquery",
6969
7070 ui . screen . bind ( "vclick" , function ( e ) { eatEventAndClose ( e ) ; } ) ;
7171
72- // St00pid browser, y u no tell me where focus go?
73- ui . container . bind ( "focusout focusin" , function ( e ) {
74- function maybeClearTimeout ( ) {
75- if ( self . _focusTimeout ) {
76- clearTimeout ( self . _focusTimeout ) ;
77- self . _focusTimeout = 0 ;
78- }
79- }
80-
81- if ( self . _isOpen ) {
82- if ( e . type === "focusout" ) {
83- maybeClearTimeout ( ) ;
84- self . _focusTimeout = setTimeout ( function ( ) {
85- self . _ui . container . focus ( ) ;
86- } , 100 ) ;
87- }
88- else
89- if ( e . type === "focusin" ) {
90- maybeClearTimeout ( ) ;
91- }
92- }
93- } ) ;
94-
9572 $ ( window )
9673 . bind ( "resize" , function ( e ) {
9774 if ( self . _isOpen ) {
@@ -660,7 +637,7 @@ define( [ "jquery",
660637 }
661638 }
662639
663- $ . mobile . popup . handleLink = function ( $link , whenOpenedCb ) {
640+ $ . mobile . popup . handleLink = function ( $link ) {
664641 var closestPage = $link . closest ( ":jqmData(role='page')" ) ,
665642 scope = ( ( closestPage . length === 0 ) ? $ ( "body" ) : closestPage ) ,
666643 popup = $ ( $link . attr ( "href" ) , scope [ 0 ] ) ,
@@ -670,16 +647,17 @@ define( [ "jquery",
670647 offset = $link . offset ( ) ;
671648
672649 popup
673- . one ( "opened" , whenOpenedCb )
674650 . one ( "closed" , function ( ) { $link . focus ( ) ; } )
675651 . popup ( "open" ,
676652 offset . left + $link . outerWidth ( ) / 2 ,
677653 offset . top + $link . outerHeight ( ) / 2 ,
678654 $link . jqmData ( "transition" ) ) ;
679655 }
680- else {
681- whenOpenedCb ( ) ;
682- }
656+
657+ //remove after delay
658+ setTimeout ( function ( ) {
659+ $link . removeClass ( $ . mobile . activeBtnClass ) ;
660+ } , 300 ) ;
683661 } ;
684662
685663 $ ( document ) . bind ( "pagecreate create" , function ( e ) {
0 commit comments