mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +00:00
Merge "build: Update eslint-config-wikimedia 0.10.1"
This commit is contained in:
commit
80aa0b2f31
|
@ -8,6 +8,9 @@ module.exports = function ( grunt ) {
|
|||
|
||||
grunt.initConfig( {
|
||||
eslint: {
|
||||
options: {
|
||||
reportUnusedDisableDirectives: true
|
||||
},
|
||||
all: [
|
||||
'**/*.js',
|
||||
'!node_modules/**',
|
||||
|
|
|
@ -973,7 +973,6 @@
|
|||
end: end } );
|
||||
$textarea.textSelection( 'scrollToCaretPosition' );
|
||||
$( this ).data( 'offset', end );
|
||||
// eslint-disable-next-line jquery/no-event-shorthand
|
||||
$textarea[ 0 ].focus();
|
||||
}
|
||||
} );
|
||||
|
|
|
@ -426,7 +426,7 @@
|
|||
* Save text selection
|
||||
*/
|
||||
saveSelection: function () {
|
||||
context.$textarea.focus();
|
||||
context.$textarea.trigger( 'focus' );
|
||||
context.savedSelection = {
|
||||
selectionStart: context.$textarea[ 0 ].selectionStart,
|
||||
selectionEnd: context.$textarea[ 0 ].selectionEnd
|
||||
|
@ -438,7 +438,7 @@
|
|||
*/
|
||||
restoreSelection: function () {
|
||||
if ( context.savedSelection ) {
|
||||
context.$textarea.focus();
|
||||
context.$textarea.trigger( 'focus' );
|
||||
context.$textarea[ 0 ].setSelectionRange( context.savedSelection.selectionStart, context.savedSelection.selectionEnd );
|
||||
context.savedSelection = null;
|
||||
}
|
||||
|
@ -478,7 +478,7 @@
|
|||
context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
|
||||
// Restore focus and cursor if needed
|
||||
if ( hasFocus ) {
|
||||
context.$textarea.focus();
|
||||
context.$textarea.trigger( 'focus' );
|
||||
context.$textarea.textSelection( 'setSelection', { start: cursorPos[ 0 ], end: cursorPos[ 1 ] } );
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
action: {
|
||||
type: 'encapsulate',
|
||||
options: {
|
||||
// eslint-disable-next-line quotes
|
||||
pre: "'''",
|
||||
periMsg: 'wikieditor-toolbar-tool-bold-example',
|
||||
// eslint-disable-next-line quotes
|
||||
post: "'''"
|
||||
}
|
||||
}
|
||||
|
@ -41,10 +39,8 @@
|
|||
action: {
|
||||
type: 'encapsulate',
|
||||
options: {
|
||||
// eslint-disable-next-line quotes
|
||||
pre: "''",
|
||||
periMsg: 'wikieditor-toolbar-tool-italic-example',
|
||||
// eslint-disable-next-line quotes
|
||||
post: "''"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.10.0",
|
||||
"eslint-config-wikimedia": "0.10.1",
|
||||
"grunt": "1.0.3",
|
||||
"grunt-banana-checker": "0.6.0",
|
||||
"grunt-banana-checker": "0.7.0",
|
||||
"grunt-eslint": "21.0.0",
|
||||
"grunt-jsonlint": "1.1.0",
|
||||
"grunt-stylelint": "0.10.1",
|
||||
|
|
Loading…
Reference in a new issue