mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Fixing shields
Shields were being added twice. Switched the blank png to gif because the red IE background couldn't be replicated. Changed some styles from Alien to Protected. Change-Id: I9c62665e4e0dc54b8511749b9d2a629db7990a16
This commit is contained in:
parent
5c9b24eb1f
commit
30cfe6998f
|
@ -14,6 +14,15 @@
|
|||
left: 0 !important;
|
||||
bottom: 0 !important;
|
||||
right: 0 !important;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.ve-ce-protectedNode::-moz-selection,
|
||||
.ve-ce-protectedNode *::-moz-selection {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ve-ce-protectedNode {
|
||||
|
@ -105,20 +114,6 @@
|
|||
|
||||
/* ve.ce.AlienNode */
|
||||
|
||||
/* Block aliens are unselectable */
|
||||
.ve-ce-alienBlockNode,
|
||||
.ve-ce-alienBlockNode * {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.ve-ce-alienBlockNode::-moz-selection,
|
||||
.ve-ce-alienBlockNode *::-moz-selection {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* Fix weird Chrome native selection involving floated elements */
|
||||
.ve-ce-alienBlockNode:before,
|
||||
.ve-ce-alienBlockNode:after {
|
||||
|
|
|
@ -33,9 +33,7 @@ ve.ce.ProtectedNode.static = {};
|
|||
/**
|
||||
* Template for shield elements.
|
||||
*
|
||||
* Uses data URI to inject a 1x1 transparent PNG image into the DOM.
|
||||
*
|
||||
* Using transparent png instead of gif because IE 10 renders gif as solid red when used as img src.
|
||||
* Uses data URI to inject a 1x1 transparent GIF image into the DOM.
|
||||
*
|
||||
* @property {jQuery}
|
||||
* @static
|
||||
|
@ -43,8 +41,7 @@ ve.ce.ProtectedNode.static = {};
|
|||
*/
|
||||
ve.ce.ProtectedNode.static.$shieldTemplate = $( '<img>' )
|
||||
.addClass( 've-ce-protectedNode-shield' )
|
||||
.attr( 'src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAFElEQVR4' +
|
||||
'XgXAAQ0AAABAMP1L30IDCPwC/o5WcS4AAAAASUVORK5CYII=' );
|
||||
.attr( 'src', 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' );
|
||||
|
||||
/**
|
||||
* Phantom element template.
|
||||
|
@ -86,7 +83,6 @@ ve.ce.ProtectedNode.prototype.onProtectedLive = function () {
|
|||
}
|
||||
$shield = $shieldTemplate.clone().appendTo( $this );
|
||||
node.$shields = node.$shields.add( $shield );
|
||||
$this.append( $shieldTemplate.clone() );
|
||||
}
|
||||
} );
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue