diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js
index fe46474d0e..6dd12e2dcc 100644
--- a/wp-admin/js/common.js
+++ b/wp-admin/js/common.js
@@ -177,6 +177,7 @@ $(document).ready( function() {
currentPage = pageInput.val(),
isIOS = /iPhone|iPad|iPod/.test( navigator.userAgent ),
isAndroid = navigator.userAgent.indexOf( 'Android' ) !== -1,
+ isIE8 = $( document.documentElement ).hasClass( 'ie8' ),
$document = $( document ),
$window = $( window ),
$body = $( document.body ),
@@ -195,6 +196,7 @@ $(document).ready( function() {
menuTop = 0,
height = {
window: $window.height(),
+ wpwrap: $wpwrap.height(),
adminbar: $adminbar.height(),
menu: $adminMenuWrap.height()
};
@@ -535,7 +537,12 @@ $(document).ready( function() {
function pinMenu() {
var windowPos = $window.scrollTop();
- if ( isIOS || $adminmenu.data('wp-responsive') ) {
+ if ( isIOS || isIE8 || $adminmenu.data( 'wp-responsive' ) ) {
+ return;
+ }
+
+ if ( height.menu + height.adminbar + 20 > height.wpwrap ) { // 20px "buffer"
+ unpinMenu();
return;
}
@@ -545,7 +552,11 @@ $(document).ready( function() {
if ( pinnedMenuTop ) {
// let it scroll
pinnedMenuTop = false;
- menuTop = $adminMenuWrap.offset().top - height.adminbar;
+ menuTop = $adminMenuWrap.offset().top - height.adminbar - ( windowPos - lastScrollPosition );
+
+ if ( menuTop + height.menu + height.adminbar < windowPos + height.window ) {
+ menuTop = windowPos + height.window - height.menu - height.adminbar;
+ }
$adminMenuWrap.css({
position: 'absolute',
@@ -567,7 +578,11 @@ $(document).ready( function() {
if ( pinnedMenuBottom ) {
// let it scroll
pinnedMenuBottom = false;
- menuTop = $adminMenuWrap.offset().top - height.adminbar;
+ menuTop = $adminMenuWrap.offset().top - height.adminbar + ( lastScrollPosition - windowPos );
+
+ if ( menuTop + height.menu > windowPos + height.window ) {
+ menuTop = windowPos;
+ }
$adminMenuWrap.css({
position: 'absolute',
@@ -587,13 +602,17 @@ $(document).ready( function() {
} else {
// Resizing
pinnedMenuTop = pinnedMenuBottom = false;
- menuTop = $adminMenuWrap.offset().top - height.adminbar;
+ menuTop = windowPos + height.window - height.menu - height.adminbar - 1;
- $adminMenuWrap.css({
- position: 'absolute',
- top: menuTop,
- bottom: ''
- });
+ if ( menuTop > 0 ) {
+ $adminMenuWrap.css({
+ position: 'absolute',
+ top: menuTop,
+ bottom: ''
+ });
+ } else {
+ unpinMenu();
+ }
}
}
@@ -626,21 +645,10 @@ $(document).ready( function() {
}
}
- setPinMenu();
-
if ( ! isIOS ) {
$window.on( 'scroll.pin-menu', pinMenu );
}
- $document.on( 'wp-window-resized.pin-menu', function() {
- height.window = $window.height();
- height.adminbar = $adminbar.height();
- setPinMenu();
- }).on( 'wp-collapse-menu.pin-menu', function() {
- height.menu = $adminMenuWrap.height();
- setPinMenu();
- });
-
window.wpResponsive = {
init: function() {
var self = this;
@@ -775,6 +783,19 @@ $(document).ready( function() {
};
window.wpResponsive.init();
+ setPinMenu();
+
+ $document.on( 'wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu', function() {
+ height.wpwrap = $wpwrap.height();
+ height.window = $window.height();
+ height.adminbar = $adminbar.height();
+ setPinMenu();
+ }).on( 'wp-collapse-menu.pin-menu', function() {
+ height.wpwrap = $wpwrap.height();
+ height.menu = $adminMenuWrap.height();
+ setPinMenu();
+ });
+
});
// Fire a custom jQuery event at the end of window resize
diff --git a/wp-admin/js/common.min.js b/wp-admin/js/common.min.js
index 7acfe35451..22d7aae987 100644
--- a/wp-admin/js/common.min.js
+++ b/wp-admin/js/common.min.js
@@ -1 +1 @@
-var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show(),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).hide(),this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},a(document).ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a(".screen-meta-toggle a"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(b){var c=a(this.href.replace(/.+#/,"#"));b.preventDefault(),c.length&&(c.is(":visible")?screenMeta.close(c,a(this)):screenMeta.open(c,a(this)))},open:function(b,c){a(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),a(document).trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),a(document).trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),a(document).ready(function(){function c(a){var b,c,d,e,f,g,h,i=a.find(".wp-submenu");f=a.offset().top,g=u.scrollTop(),h=f-g-30,b=f+i.height()+1,c=x.height(),d=60+b-c,e=u.height()+g-50,b-d>e&&(d=b-e),d>h&&(d=h),d>1?i.css("margin-top","-"+d+"px"):i.css("margin-top","")}function d(){var a=u.scrollTop();r||y.data("wp-responsive")||(J.menu+J.adminbar>J.window&&(a>F?G?(G=!1,I=w.offset().top-J.adminbar,w.css({position:"absolute",top:I,bottom:""})):!H&&w.offset().top+J.menua?H?(H=!1,I=w.offset().top-J.adminbar,w.css({position:"absolute",top:I,bottom:""})):!G&&w.offset().top>=a+J.adminbar&&(G=!0,w.css({position:"fixed",top:"",bottom:""})):(G=H=!1,I=w.offset().top-J.adminbar,w.css({position:"absolute",top:I,bottom:""}))),F=a)}function e(){r||(G=H=!1,w.css({position:"",top:"",bottom:""}))}function f(){y.data("wp-responsive")?(v.removeClass("sticky-menu"),e()):J.menu+J.adminbar>J.window?(d(),v.removeClass("sticky-menu")):(v.addClass("sticky-menu"),e())}var g,h,i,j,k,l,m,n,o=!1,p=a("input.current-page"),q=p.val(),r=/iPhone|iPad|iPod/.test(navigator.userAgent),s=-1!==navigator.userAgent.indexOf("Android"),t=a(document),u=a(b),v=a(document.body),w=a("#adminmenuwrap"),x=a("#wpwrap"),y=a("#adminmenu"),z=a("#wp-responsive-overlay"),A=a("#wp-toolbar"),B=A.find('a[aria-haspopup="true"]'),C=a(".meta-box-sortables"),D=!1,E=a("#wpadminbar"),F=0,G=!1,H=!1,I=0,J={window:u.height(),adminbar:E.height(),menu:w.height()};y.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var c,d,e=a(document.body);a("#adminmenu div.wp-submenu").css("margin-top",""),c=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,c&&960>c?e.hasClass("auto-fold")?(e.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),d="open"):(e.addClass("auto-fold"),setUserSetting("unfold",0),d="folded"):e.hasClass("folded")?(e.removeClass("folded"),setUserSetting("mfold","o"),d="open"):(e.addClass("folded"),setUserSetting("mfold","f"),d="folded"),a(document).trigger("wp-collapse-menu",{state:d})}),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(l=r?"touchstart":"click",a(document.body).on(l+".wp-mobile-hover",function(b){y.data("wp-responsive")||a(b.target).closest("#adminmenu").length||y.find("li.opensub").removeClass("opensub")}),y.find("a.wp-has-submenu").on(l+".wp-mobile-hover",function(b){var d=a(this).parent();y.data("wp-responsive")||d.hasClass("opensub")||d.hasClass("wp-menu-open")&&!(d.width()<40)||(b.preventDefault(),c(d),y.find("li.opensub").removeClass("opensub"),d.addClass("opensub"))})),r||s||(y.find("li.wp-has-submenu").hoverIntent({over:function(){var b=a(this),d=b.find(".wp-submenu"),e=parseInt(d.css("top"),10);isNaN(e)||e>-5||y.data("wp-responsive")||(c(b),y.find("li.opensub").removeClass("opensub"),b.addClass("opensub"))},out:function(){y.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),y.on("focus.adminmenu",".wp-submenu a",function(b){y.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){y.data("wp-responsive")||a(b.target).closest("li.menu-top").removeClass("opensub")}).find("li.wp-has-submenu").on("focusin.adminmenu",function(){c(a(this))})),a("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2"),a("div.updated, div.error").not(".below-h2, .inline").insertAfter(a("div.wrap h2:first")),screenMeta.init(),a("tbody").children().children(".check-column").find(":checkbox").click(function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!o)return!0;g=a(o).closest("form").find(":checkbox"),h=g.index(o),i=g.index(this),j=a(this).prop("checked"),h>0&&i>0&&h!=i&&(k=i>h?g.slice(h,i):g.slice(i,h),k.prop("checked",function(){return a(this).closest("tr").is(":visible")?j:!1}))}o=this;var c=a(this).closest("tbody").find(":checkbox").filter(":visible").not(":checked");return a(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===c.length}),!0}),a("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(b){var c=a(this),d=c.closest("table"),e=c.prop("checked"),f=b.shiftKey||c.data("wp-toggle");d.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return a(this).is(":hidden")?!1:f?!a(this).prop("checked"):e?!0:!1}),d.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return f?!1:e?!0:!1})}),a("td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap").focusin(function(){clearTimeout(m),n=a(this).find(".row-actions"),n.addClass("visible")}).focusout(function(){m=setTimeout(function(){n.removeClass("visible")},30)}),a("#default-password-nag-no").click(function(){return setUserSetting("default_password_nag","hide"),a("div.default-password-nag").hide(),!1}),a("#newcontent").bind("keydown.wpevent_InsertTab",function(b){var c,d,e,f,g,h=b.target;if(27==b.keyCode)return void a(h).data("tab-out",!0);if(!(9!=b.keyCode||b.ctrlKey||b.altKey||b.shiftKey)){if(a(h).data("tab-out"))return void a(h).data("tab-out",!1);c=h.selectionStart,d=h.selectionEnd,e=h.value;try{this.lastKey=9}catch(i){}document.selection?(h.focus(),g=document.selection.createRange(),g.text=" "):c>=0&&(f=this.scrollTop,h.value=e.substring(0,c).concat(" ",e.substring(d)),h.selectionStart=h.selectionEnd=c+1,this.scrollTop=f),b.stopPropagation&&b.stopPropagation(),b.preventDefault&&b.preventDefault()}}),a("#newcontent").bind("blur.wpevent_InsertTab",function(){this.lastKey&&9==this.lastKey&&this.focus()}),p.length&&p.closest("form").submit(function(){-1==a('select[name="action"]').val()&&-1==a('select[name="action2"]').val()&&p.val()==q&&p.val("1")}),a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function(){a('select[name^="action"]').val("-1")}),a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",function(a){a.target.scrollIntoView&&a.target.scrollIntoView(!1)}),function(){function b(){c.prop("disabled",""===d.map(function(){return a(this).val()}).get().join(""))}var c,d,e=a("form.wp-upload-form");e.length&&(c=e.find('input[type="submit"]'),d=e.find('input[type="file"]'),b(),d.on("change",b))}(),f(),r||u.on("scroll.pin-menu",d),t.on("wp-window-resized.pin-menu",function(){J.window=u.height(),J.adminbar=E.height(),f()}).on("wp-collapse-menu.pin-menu",function(){J.menu=w.height(),f()}),b.wpResponsive={init:function(){var c=this;t.on("wp-responsive-activate.wp-responsive",function(){c.activate()}).on("wp-responsive-deactivate.wp-responsive",function(){c.deactivate()}),a("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),a("#wp-admin-bar-menu-toggle").on("click.wp-responsive",function(b){b.preventDefault(),x.toggleClass("wp-responsive-open"),x.hasClass("wp-responsive-open")?(a(this).find("a").attr("aria-expanded","true"),a("#adminmenu a:first").focus()):a(this).find("a").attr("aria-expanded","false")}),y.on("click.wp-responsive","li.wp-has-submenu > a",function(b){y.data("wp-responsive")&&(a(this).parent("li").toggleClass("selected"),b.preventDefault())}),c.trigger(),t.on("wp-window-resized.wp-responsive",a.proxy(this.trigger,this)),u.on("load.wp-responsive",function(){var a=navigator.userAgent.indexOf("AppleWebKit/")>-1?u.width():b.innerWidth;782>=a&&c.disableSortables()})},activate:function(){f(),v.hasClass("auto-fold")||v.addClass("auto-fold"),y.data("wp-responsive",1),this.disableSortables()},deactivate:function(){f(),y.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a;b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth),782>=a?D||(t.trigger("wp-responsive-activate"),D=!0):D&&(t.trigger("wp-responsive-deactivate"),D=!1),480>=a?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===z.length&&(z=a('').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){A.find(".menupop.hover").removeClass("hover"),a(this).hide()})),B.on("click.wp-responsive",function(){z.show()})},disableOverlay:function(){B.off("click.wp-responsive"),z.hide()},disableSortables:function(){if(C.length)try{C.sortable("disable")}catch(a){}},enableSortables:function(){if(C.length)try{C.sortable("enable")}catch(a){}}},b.wpResponsive.init()}),function(){function c(){a(document).trigger("wp-window-resized")}function d(){b.clearTimeout(e),e=b.setTimeout(c,200)}var e;a(b).on("resize.wp-fire-once",d)}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var a=document.createElement("style");a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(a)}}()}(jQuery,window);
\ No newline at end of file
+var showNotice,adminMenu,columns,validateForm,screenMeta;!function(a,b){adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var c=a(this),d=c.val();c.prop("checked")?b.checked(d):b.unchecked(d),columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show(),this.colSpanChange(1)},unchecked:function(b){a(".column-"+b).hide(),this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var a=this.id;return a.substring(a,a.length-5)}).get().join(",")}},colSpanChange:function(b){var c,d=a("table").find(".colspanchange");d.length&&(c=parseInt(d.attr("colspan"),10)+b,d.attr("colspan",c.toString()))}},a(document).ready(function(){columns.init()}),validateForm=function(b){return!a(b).find(".form-required").filter(function(){return""===a("input:visible",this).val()}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()},showNotice={warn:function(){var a=commonL10n.warnDelete||"";return confirm(a)?!0:!1},note:function(a){alert(a)}},screenMeta={element:null,toggles:null,page:null,init:function(){this.element=a("#screen-meta"),this.toggles=a(".screen-meta-toggle a"),this.page=a("#wpcontent"),this.toggles.click(this.toggleEvent)},toggleEvent:function(b){var c=a(this.href.replace(/.+#/,"#"));b.preventDefault(),c.length&&(c.is(":visible")?screenMeta.close(c,a(this)):screenMeta.open(c,a(this)))},open:function(b,c){a(".screen-meta-toggle").not(c.parent()).css("visibility","hidden"),b.parent().show(),b.slideDown("fast",function(){b.focus(),c.addClass("screen-meta-active").attr("aria-expanded",!0)}),a(document).trigger("screen:options:open")},close:function(b,c){b.slideUp("fast",function(){c.removeClass("screen-meta-active").attr("aria-expanded",!1),a(".screen-meta-toggle").css("visibility",""),b.parent().hide()}),a(document).trigger("screen:options:close")}},a(".contextual-help-tabs").delegate("a","click",function(b){var c,d=a(this);return b.preventDefault(),d.is(".active a")?!1:(a(".contextual-help-tabs .active").removeClass("active"),d.parent("li").addClass("active"),c=a(d.attr("href")),a(".help-tab-content").not(c).removeClass("active").hide(),void c.addClass("active").show())}),a(document).ready(function(){function c(a){var b,c,d,e,f,g,h,i=a.find(".wp-submenu");f=a.offset().top,g=v.scrollTop(),h=f-g-30,b=f+i.height()+1,c=y.height(),d=60+b-c,e=v.height()+g-50,b-d>e&&(d=b-e),d>h&&(d=h),d>1?i.css("margin-top","-"+d+"px"):i.css("margin-top","")}function d(){var a=v.scrollTop();if(!(r||t||z.data("wp-responsive"))){if(K.menu+K.adminbar+20>K.wpwrap)return void e();K.menu+K.adminbar>K.window&&(a>G?H?(H=!1,J=x.offset().top-K.adminbar-(a-G),J+K.menu+K.adminbara?I?(I=!1,J=x.offset().top-K.adminbar+(G-a),J+K.menu>a+K.window&&(J=a),x.css({position:"absolute",top:J,bottom:""})):!H&&x.offset().top>=a+K.adminbar&&(H=!0,x.css({position:"fixed",top:"",bottom:""})):(H=I=!1,J=a+K.window-K.menu-K.adminbar-1,J>0?x.css({position:"absolute",top:J,bottom:""}):e())),G=a}}function e(){r||(H=I=!1,x.css({position:"",top:"",bottom:""}))}function f(){z.data("wp-responsive")?(w.removeClass("sticky-menu"),e()):K.menu+K.adminbar>K.window?(d(),w.removeClass("sticky-menu")):(w.addClass("sticky-menu"),e())}var g,h,i,j,k,l,m,n,o=!1,p=a("input.current-page"),q=p.val(),r=/iPhone|iPad|iPod/.test(navigator.userAgent),s=-1!==navigator.userAgent.indexOf("Android"),t=a(document.documentElement).hasClass("ie8"),u=a(document),v=a(b),w=a(document.body),x=a("#adminmenuwrap"),y=a("#wpwrap"),z=a("#adminmenu"),A=a("#wp-responsive-overlay"),B=a("#wp-toolbar"),C=B.find('a[aria-haspopup="true"]'),D=a(".meta-box-sortables"),E=!1,F=a("#wpadminbar"),G=0,H=!1,I=!1,J=0,K={window:v.height(),wpwrap:y.height(),adminbar:F.height(),menu:x.height()};z.on("click.wp-submenu-head",".wp-submenu-head",function(b){a(b.target).parent().siblings("a").get(0).click()}),a("#collapse-menu").on("click.collapse-menu",function(){var c,d,e=a(document.body);a("#adminmenu div.wp-submenu").css("margin-top",""),c=b.innerWidth?Math.max(b.innerWidth,document.documentElement.clientWidth):961,c&&960>c?e.hasClass("auto-fold")?(e.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),d="open"):(e.addClass("auto-fold"),setUserSetting("unfold",0),d="folded"):e.hasClass("folded")?(e.removeClass("folded"),setUserSetting("mfold","o"),d="open"):(e.addClass("folded"),setUserSetting("mfold","f"),d="folded"),a(document).trigger("wp-collapse-menu",{state:d})}),("ontouchstart"in b||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(l=r?"touchstart":"click",a(document.body).on(l+".wp-mobile-hover",function(b){z.data("wp-responsive")||a(b.target).closest("#adminmenu").length||z.find("li.opensub").removeClass("opensub")}),z.find("a.wp-has-submenu").on(l+".wp-mobile-hover",function(b){var d=a(this).parent();z.data("wp-responsive")||d.hasClass("opensub")||d.hasClass("wp-menu-open")&&!(d.width()<40)||(b.preventDefault(),c(d),z.find("li.opensub").removeClass("opensub"),d.addClass("opensub"))})),r||s||(z.find("li.wp-has-submenu").hoverIntent({over:function(){var b=a(this),d=b.find(".wp-submenu"),e=parseInt(d.css("top"),10);isNaN(e)||e>-5||z.data("wp-responsive")||(c(b),z.find("li.opensub").removeClass("opensub"),b.addClass("opensub"))},out:function(){z.data("wp-responsive")||a(this).removeClass("opensub").find(".wp-submenu").css("margin-top","")},timeout:200,sensitivity:7,interval:90}),z.on("focus.adminmenu",".wp-submenu a",function(b){z.data("wp-responsive")||a(b.target).closest("li.menu-top").addClass("opensub")}).on("blur.adminmenu",".wp-submenu a",function(b){z.data("wp-responsive")||a(b.target).closest("li.menu-top").removeClass("opensub")}).find("li.wp-has-submenu").on("focusin.adminmenu",function(){c(a(this))})),a("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2"),a("div.updated, div.error").not(".below-h2, .inline").insertAfter(a("div.wrap h2:first")),screenMeta.init(),a("tbody").children().children(".check-column").find(":checkbox").click(function(b){if("undefined"==b.shiftKey)return!0;if(b.shiftKey){if(!o)return!0;g=a(o).closest("form").find(":checkbox"),h=g.index(o),i=g.index(this),j=a(this).prop("checked"),h>0&&i>0&&h!=i&&(k=i>h?g.slice(h,i):g.slice(i,h),k.prop("checked",function(){return a(this).closest("tr").is(":visible")?j:!1}))}o=this;var c=a(this).closest("tbody").find(":checkbox").filter(":visible").not(":checked");return a(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",function(){return 0===c.length}),!0}),a("thead, tfoot").find(".check-column :checkbox").on("click.wp-toggle-checkboxes",function(b){var c=a(this),d=c.closest("table"),e=c.prop("checked"),f=b.shiftKey||c.data("wp-toggle");d.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return a(this).is(":hidden")?!1:f?!a(this).prop("checked"):e?!0:!1}),d.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return f?!1:e?!0:!1})}),a("td.post-title, td.title, td.comment, .bookmarks td.column-name, td.blogname, td.username, .dashboard-comment-wrap").focusin(function(){clearTimeout(m),n=a(this).find(".row-actions"),n.addClass("visible")}).focusout(function(){m=setTimeout(function(){n.removeClass("visible")},30)}),a("#default-password-nag-no").click(function(){return setUserSetting("default_password_nag","hide"),a("div.default-password-nag").hide(),!1}),a("#newcontent").bind("keydown.wpevent_InsertTab",function(b){var c,d,e,f,g,h=b.target;if(27==b.keyCode)return void a(h).data("tab-out",!0);if(!(9!=b.keyCode||b.ctrlKey||b.altKey||b.shiftKey)){if(a(h).data("tab-out"))return void a(h).data("tab-out",!1);c=h.selectionStart,d=h.selectionEnd,e=h.value;try{this.lastKey=9}catch(i){}document.selection?(h.focus(),g=document.selection.createRange(),g.text=" "):c>=0&&(f=this.scrollTop,h.value=e.substring(0,c).concat(" ",e.substring(d)),h.selectionStart=h.selectionEnd=c+1,this.scrollTop=f),b.stopPropagation&&b.stopPropagation(),b.preventDefault&&b.preventDefault()}}),a("#newcontent").bind("blur.wpevent_InsertTab",function(){this.lastKey&&9==this.lastKey&&this.focus()}),p.length&&p.closest("form").submit(function(){-1==a('select[name="action"]').val()&&-1==a('select[name="action2"]').val()&&p.val()==q&&p.val("1")}),a('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function(){a('select[name^="action"]').val("-1")}),a("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",function(a){a.target.scrollIntoView&&a.target.scrollIntoView(!1)}),function(){function b(){c.prop("disabled",""===d.map(function(){return a(this).val()}).get().join(""))}var c,d,e=a("form.wp-upload-form");e.length&&(c=e.find('input[type="submit"]'),d=e.find('input[type="file"]'),b(),d.on("change",b))}(),r||v.on("scroll.pin-menu",d),b.wpResponsive={init:function(){var c=this;u.on("wp-responsive-activate.wp-responsive",function(){c.activate()}).on("wp-responsive-deactivate.wp-responsive",function(){c.deactivate()}),a("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),a("#wp-admin-bar-menu-toggle").on("click.wp-responsive",function(b){b.preventDefault(),y.toggleClass("wp-responsive-open"),y.hasClass("wp-responsive-open")?(a(this).find("a").attr("aria-expanded","true"),a("#adminmenu a:first").focus()):a(this).find("a").attr("aria-expanded","false")}),z.on("click.wp-responsive","li.wp-has-submenu > a",function(b){z.data("wp-responsive")&&(a(this).parent("li").toggleClass("selected"),b.preventDefault())}),c.trigger(),u.on("wp-window-resized.wp-responsive",a.proxy(this.trigger,this)),v.on("load.wp-responsive",function(){var a=navigator.userAgent.indexOf("AppleWebKit/")>-1?v.width():b.innerWidth;782>=a&&c.disableSortables()})},activate:function(){f(),w.hasClass("auto-fold")||w.addClass("auto-fold"),z.data("wp-responsive",1),this.disableSortables()},deactivate:function(){f(),z.removeData("wp-responsive"),this.enableSortables()},trigger:function(){var a;b.innerWidth&&(a=Math.max(b.innerWidth,document.documentElement.clientWidth),782>=a?E||(u.trigger("wp-responsive-activate"),E=!0):E&&(u.trigger("wp-responsive-deactivate"),E=!1),480>=a?this.enableOverlay():this.disableOverlay())},enableOverlay:function(){0===A.length&&(A=a('').insertAfter("#wpcontent").hide().on("click.wp-responsive",function(){B.find(".menupop.hover").removeClass("hover"),a(this).hide()})),C.on("click.wp-responsive",function(){A.show()})},disableOverlay:function(){C.off("click.wp-responsive"),A.hide()},disableSortables:function(){if(D.length)try{D.sortable("disable")}catch(a){}},enableSortables:function(){if(D.length)try{D.sortable("enable")}catch(a){}}},b.wpResponsive.init(),f(),u.on("wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu",function(){K.wpwrap=y.height(),K.window=v.height(),K.adminbar=F.height(),f()}).on("wp-collapse-menu.pin-menu",function(){K.wpwrap=y.height(),K.menu=x.height(),f()})}),function(){function c(){a(document).trigger("wp-window-resized")}function d(){b.clearTimeout(e),e=b.setTimeout(c,200)}var e;a(b).on("resize.wp-fire-once",d)}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var a=document.createElement("style");a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(a)}}()}(jQuery,window);
\ No newline at end of file
diff --git a/wp-includes/version.php b/wp-includes/version.php
index a7d594c4d8..c89f0bebae 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
-$wp_version = '4.1-alpha-20141020';
+$wp_version = '4.1-alpha-20141021';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.