Merge "RCFilters: Invert the muted state of inverted namespace options"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 26 Jun 2017 22:46:47 +0000 (22:46 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 26 Jun 2017 22:46:47 +0000 (22:46 +0000)
resources/src/mediawiki/mediawiki.Title.js
resources/src/mediawiki/mediawiki.filewarning.less

index 6765270..253e0ef 100644 (file)
         */
        Title.exists = function ( title ) {
                var match,
-                       type = $.type( title ),
                        obj = Title.exist.pages;
 
-               if ( type === 'string' ) {
+               if ( typeof title === 'string' ) {
                        match = obj[ title ];
-               } else if ( type === 'object' && title instanceof Title ) {
+               } else if ( title instanceof Title ) {
                        match = obj[ title.toString() ];
                } else {
                        throw new Error( 'mw.Title.exists: title must be a string or an instance of Title' );
                }
 
-               if ( typeof match === 'boolean' ) {
-                       return match;
+               if ( typeof match !== 'boolean' ) {
+                       return null;
                }
 
-               return null;
+               return match;
        };
 
        /**
index 2c3e137..be7aa63 100644 (file)
@@ -1,5 +1,12 @@
 @import 'mediawiki.ui/variables';
 
+// Increase the area of the button, so that the user can move the mouse cursor
+// to the popup without the popup disappearing. (T157544)
+.mediawiki-filewarning-anchor {
+       padding-bottom: 10px;
+       margin-bottom: -10px;
+}
+
 .mediawiki-filewarning {
        visibility: hidden;