diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 9d4cf465..313020b3 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -161,9 +161,22 @@ this.$parent.position(); }, + /* + * For the given input method id, render the selection option. + * + * @param {string} imeId Input method id + * @param {boolean} selected Whether the input is the currently selected one. + * @return {Object} jQuery object corresponding to the input method item. + */ renderInputmethodOption: function ( imeId, selected ) { var $imeLabel, name, description, inputmethod, $inputMethodItem; + if ( imeId !== 'system' && !$.ime.sources[imeId] ) { + // imeId not known for jquery.ime. + // It is very rare, but still validate it. + return $(); + } + $imeLabel = $( '