File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
hearth/media/js/views/app/ratings Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,14 @@ define('views/app/ratings/add',
2727 if ( textarea ) {
2828 textarea . focus ( ) ;
2929 }
30+ if ( scrollTo && ! caps . widescreen ( ) ) {
31+ // Wait for the keyboard to shrink the window height.
32+ // Would be awesome if FFOS fired a `scrollbar appeared` event.
33+ setTimeout ( function ( ) {
34+ window . scrollTo ( 0 , 200 ) ;
35+ } , 350 ) ;
36+ }
3037 } ) ;
31-
32- if ( scrollTo && ! caps . widescreen ( ) ) {
33- console . log ( 'scrollTo' ) ;
34- $reviewBox . find ( 'textarea' ) . on ( 'focus' , function ( ) {
35- console . log ( 'focus' ) ;
36- window . scrollTo ( 0 , 200 ) ;
37- } ) ;
38- }
3938 } ) ;
4039
4140 builder . z ( 'type' , 'leaf' ) ;
Original file line number Diff line number Diff line change @@ -62,13 +62,14 @@ define('views/app/ratings/edit',
6262 if ( textarea ) {
6363 textarea . focus ( ) ;
6464 }
65+ if ( scrollTo && ! caps . widescreen ( ) ) {
66+ // Wait for the keyboard to shrink the window height.
67+ // Would be awesome if FFOS fired a `scrollbar appeared` event.
68+ setTimeout ( function ( ) {
69+ window . scrollTo ( 0 , 200 ) ;
70+ } , 350 ) ;
71+ }
6572 } ) ;
66-
67- if ( scrollTo && ! caps . widescreen ( ) ) {
68- $reviewBox . find ( 'textarea' ) . on ( 'focus' , function ( ) {
69- window . scrollTo ( 0 , 200 ) ;
70- } ) ;
71- }
7273 } ) ;
7374
7475 // If we hit the API and find out that there's no review for the user,
You can’t perform that action at this time.
0 commit comments