Changeset 24619
- Timestamp:
- 07/09/2013 09:26:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/common.js
r23485 r24619 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: ...)" 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 {
Note: See TracChangeset
for help on using the changeset viewer.