mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Avoid useless jQuery.click shortcut
Why have one event API when you can have ten... Change-Id: I645cbeb4e486aba9e734ba47d2e7c3958a694f19
This commit is contained in:
parent
a9894809f6
commit
e9250d87fd
|
@ -408,7 +408,7 @@
|
|||
$caVeEdit.remove();
|
||||
} else if ( pageCanLoadVE ) {
|
||||
// Allow instant switching to edit mode, without refresh
|
||||
$caVeEdit.click( init.onEditTabClick );
|
||||
$caVeEdit.on( 'click', init.onEditTabClick );
|
||||
}
|
||||
|
||||
// Alter the edit tab (#ca-edit)
|
||||
|
@ -523,7 +523,7 @@
|
|||
// and would preserve the wrong DOM with a diff on top.
|
||||
$editsections
|
||||
.find( '.mw-editsection-visualeditor' )
|
||||
.click( init.onEditSectionLinkClick )
|
||||
.on( 'click', init.onEditSectionLinkClick )
|
||||
;
|
||||
}
|
||||
},
|
||||
|
@ -755,7 +755,7 @@
|
|||
// Handle section edit link clicks
|
||||
$( '.mw-editsection a' ).on( 'click', init.onEditSectionLinkClick );
|
||||
// Allow instant switching to edit mode, without refresh
|
||||
$( '#ca-edit' ).click( function ( e ) {
|
||||
$( '#ca-edit' ).on( 'click', function ( e ) {
|
||||
if (
|
||||
mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
||||
(
|
||||
|
|
|
@ -860,9 +860,9 @@ ve.init.mw.DesktopArticleTarget.prototype.setupSkinTabs = function () {
|
|||
if ( this.isViewPage ) {
|
||||
// Allow instant switching back to view mode, without refresh
|
||||
$( '#ca-view a, #ca-nstab-visualeditor a' )
|
||||
.click( this.onViewTabClick.bind( this ) );
|
||||
.on( 'click', this.onViewTabClick.bind( this ) );
|
||||
|
||||
$( '#ca-viewsource, #ca-edit' ).click( function ( e ) {
|
||||
$( '#ca-viewsource, #ca-edit' ).on( 'click', function ( e ) {
|
||||
if ( !target.active || e.which !== 1 || e.shiftKey || e.altKey || e.ctrlKey || e.metaKey ) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ ve.ui.MWEducationPopupTool = function VeUiMwEducationPopupTool( config ) {
|
|||
this.shownEducationPopup = false;
|
||||
this.$pulsatingDot = $( '<div>' ).addClass( 've-ui-pulsatingDot' );
|
||||
this.$stillDot = $( '<div>' ).addClass( 've-ui-stillDot' );
|
||||
$shield = $( '<div>' ).addClass( 've-ui-educationPopup-shield' ).click( function () {
|
||||
$shield = $( '<div>' ).addClass( 've-ui-educationPopup-shield' ).on( 'click', function () {
|
||||
if ( !tool.shownEducationPopup ) {
|
||||
if ( ve.init.target.openEducationPopupTool ) {
|
||||
ve.init.target.openEducationPopupTool.popup.toggle( false );
|
||||
|
|
Loading…
Reference in a new issue