Allow disabling of IME by a jQuery selector

Add the variable $wgULSNoImeSelectors to allow custom
disabling of IME in specific elements.

Add captcha input field id to the exclusion list.

Bug: 41675
Change-Id: Ib03a20c50a4f473e6a58638b85da16659268eb09
This commit is contained in:
Amir E. Aharoni
2013-06-12 22:24:39 -07:00
committed by Nikerabbit
parent fcf27188f6
commit 8205e294d7
3 changed files with 16 additions and 2 deletions

View File

@@ -160,7 +160,7 @@
mw.ime.setup = function () {
$( 'body' ).on( 'focus.ime', inputSelector, function () {
var imeselector, $input;
var imeselector, $input, noImeSelector;
// It's possible to disable IME through the settings
// panels before it was initialized, so we need to check
@@ -170,6 +170,12 @@
}
$input = $( this );
noImeSelector = mw.config.get( 'wgULSNoImeSelectors' ).join( ', ' );
if ( noImeSelector.length && $input.is( noImeSelector ) ) {
$input.addClass( 'noime' );
}
$input.ime( {
languages: mw.ime.getIMELanguageList(),
languageSelector: function () {