Skip to content

Commit a625df3

Browse files
committed
Enhance the condition required to enable split view
Ajax should be enabled Pixel to CSS pixel density should be below 1.2, we want to avoid having split view in high density devices
1 parent 47e6d04 commit a625df3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

experiments/splitview/jquery.mobile.splitview.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
if($.support.touch){
66
$('html').addClass('touch');
77
}
8-
if ($.mobile.media("screen and (min-width:480px)")||($.mobile.browser.ie && $(this).width() >= 480)) {
8+
var $query = $.mobile.media('screen and (min-width: 480px)') && ($.mobile.media('(-webkit-max-device-pixel-ratio: 1.2)') || $.mobile.media('max--moz-device-pixel-ratio: 1.2)'));
9+
$.support.splitview = ($query || ($.mobile.browser.ie && $(this).width() >= 480)) && $.mobile.ajaxEnabled;
10+
if ($.support.splitview) {
911
$('html').addClass('splitview');
1012
//on window.ready() execution:
1113
$(function() {

0 commit comments

Comments
 (0)