mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-13 17:27:42 +00:00
Enable spellchecking on Firefox
The spellchecking was disabled for Firefox on non-Mac systems because
Firefox had a bug and inserts characters (like B) into the content when
enter an access key combination (like Shift+Alt+B).
Firefox 65 fixed the problem by changing the default for
dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content
from false to true.
The old behavior can activated in about:config by setting
dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content = false
This change reverts 29f6b48eeb
.
Bug: T177509
Change-Id: I23773b2ea2a154269a5b3064cd8d9e9132051c38
This commit is contained in:
parent
d0418ae8bb
commit
6075e4cb83
|
@ -1,7 +1,6 @@
|
|||
( function () {
|
||||
var useCodeMirror, codeMirror, api, originHooksTextarea, cmTextSelection,
|
||||
$textbox1,
|
||||
enableContentEditable = true,
|
||||
// Keep these modules in sync with CodeMirrorHooks.php
|
||||
codeMirrorCoreModules = [
|
||||
'ext.CodeMirror.lib',
|
||||
|
@ -37,13 +36,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
// Disable spellchecking for Firefox users on non-Mac systems (Bug T95104)
|
||||
if ( navigator.userAgent.indexOf( 'Firefox' ) > -1 &&
|
||||
navigator.userAgent.indexOf( 'Mac' ) === -1
|
||||
) {
|
||||
enableContentEditable = false;
|
||||
}
|
||||
|
||||
// jQuery.textSelection overrides for CodeMirror.
|
||||
// See jQuery.textSelection.js for method documentation
|
||||
cmTextSelection = {
|
||||
|
@ -131,8 +123,8 @@
|
|||
Home: 'goLineLeft',
|
||||
End: 'goLineRight'
|
||||
},
|
||||
inputStyle: enableContentEditable ? 'contenteditable' : 'textarea',
|
||||
spellcheck: enableContentEditable,
|
||||
inputStyle: 'contenteditable',
|
||||
spellcheck: true,
|
||||
viewportMargin: Infinity
|
||||
} );
|
||||
$codeMirror = $( codeMirror.getWrapperElement() );
|
||||
|
|
Loading…
Reference in a new issue