mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
Merge "Replace "shield" hack in MWReferenceResultWidget with CSS"
This commit is contained in:
commit
c5a9012b67
|
@ -20,10 +20,7 @@ ve.ui.MWReferenceResultWidget = function VeUiMWReferenceResultWidget() {
|
|||
|
||||
// Initialization
|
||||
this.$element
|
||||
.addClass( 've-ui-mwReferenceResultWidget' )
|
||||
.append(
|
||||
$( '<div>' ).addClass( 've-ui-mwReferenceResultWidget-shield' )
|
||||
);
|
||||
.addClass( 've-ui-mwReferenceResultWidget' );
|
||||
};
|
||||
|
||||
/* Inheritance */
|
||||
|
|
|
@ -16,13 +16,7 @@
|
|||
|
||||
&.oo-ui-labelElement .oo-ui-labelElement-label {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
&-shield {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
// Disable click events in the preview
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ QUnit.module( 've.ui.MWReferenceResultWidget (Cite)', ve.test.utils.newMwEnviron
|
|||
QUnit.test( 'Initialization', ( assert ) => {
|
||||
const widget = new ve.ui.MWReferenceResultWidget();
|
||||
assert.true( widget instanceof OO.ui.OptionWidget );
|
||||
assert.strictEqual( widget.$element.children( '.ve-ui-mwReferenceResultWidget-shield' ).length, 1 );
|
||||
assert.strictEqual( widget.$element.children( '.ve-ui-mwReferenceResultWidget-shield' ).length, 0 );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue