Ticket #23817: 23817.patch
File 23817.patch, 1.3 KB (added by , 11 years ago) |
---|
-
wp-admin/js/common.js
169 169 }); 170 170 171 171 $('#collapse-menu').on('click.collapse-menu', function(e){ 172 var body = $( document.body);172 var body = $( document.body ), respWidth; 173 173 174 174 // reset any compensation for submenus near the bottom of the screen 175 175 $('#adminmenu div.wp-submenu').css('margin-top', ''); 176 176 177 if ( $(window).width() < 900 ) { 177 // WebKit excludes the width of the vertical scrollbar when applying the CSS "@media screen and (max-width: 900px)" 178 // and matches $(window).width(). 179 // Firefox and IE > 8 include the scrollbar width, so after the jQuery normalization 180 // $(window).width() is 884px but window.innerWidth is 900px. 181 // (using window.innerWidth also excludes IE < 9) 182 respWidth = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? $(window).width() : window.innerWidth; 183 184 if ( respWidth && respWidth < 900 ) { 178 185 if ( body.hasClass('auto-fold') ) { 179 body.removeClass('auto-fold') ;186 body.removeClass('auto-fold').removeClass('folded'); 180 187 setUserSetting('unfold', 1); 181 body.removeClass('folded');182 188 deleteUserSetting('mfold'); 183 189 } else { 184 190 body.addClass('auto-fold');