summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyeong Kim <minkyeong.kim@samsung.com>2013-04-23 14:04:00 +0900
committerhjnim.kim <hjnim.kim@samsung.com>2013-05-03 15:29:06 +0900
commit8a85e07f83db83a0cee50a7c7dc437f635d12726 (patch)
treee85dc24e0110e11cbc642568f5af99bfd90c6f72
parent10a17c79480bdede7cb00e668b332e0a3a60949a (diff)
downloadweb-ui-fw-8a85e07f83db83a0cee50a7c7dc437f635d12726.tar.gz
web-ui-fw-8a85e07f83db83a0cee50a7c7dc437f635d12726.tar.bz2
web-ui-fw-8a85e07f83db83a0cee50a7c7dc437f635d12726.zip
Fastscroll: Add 'orientationchange' event handler.
Resolves #N_SE-35655, #N_SE-35660, #N_SE-35671. Change-Id: I0997eb813f162047536cd257011cd03b72037d41
-rw-r--r--src/js/widgets/jquery.mobile.tizen.fastscroll.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/js/widgets/jquery.mobile.tizen.fastscroll.js b/src/js/widgets/jquery.mobile.tizen.fastscroll.js
index a9f9d538..76422015 100644
--- a/src/js/widgets/jquery.mobile.tizen.fastscroll.js
+++ b/src/js/widgets/jquery.mobile.tizen.fastscroll.js
@@ -115,7 +115,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
page = $el.closest( ':jqmData(role="page")' ),
jumpToDivider;
- this.scrollview = $el.closest( '.ui-scrollview-clip' );
+ this.scrollview = $el.addClass( 'ui-fastscroll-target' ).closest( '.ui-scrollview-clip' );
this.shortcutsContainer = $( '<div class="ui-fastscroll" aria-label="Fast scroll bar, double tap to fast scroll mode" tabindex="0"/>' );
this.shortcutsList = $( '<ul aria-hidden="true"></ul>' );
@@ -244,10 +244,6 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
self.refresh();
} );
- $( window ).unbind( ".fastscroll" ).bind( "resize.fastscroll", function ( e ) {
- self.refresh();
- } );
-
self.scrollview.bind( "scrollstart", function ( e ) {
self._setTimer( false );
}).bind( "scrollstop", function ( e ) {
@@ -659,6 +655,9 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) {
.fastscroll();
} );
+ $( window ).bind( "resize orientationchange", function ( e ) {
+ $( ".ui-page-active .ui-fastscroll-target" ).fastscroll( "refresh" );
+ } );
} ( jQuery ) );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);