Skip to content

Disable spellchecking in notebook #3087

Closed
dmopalmer opened this Issue Mar 27, 2013 · 6 comments

3 participants

@dmopalmer

When I use notebook, my browser (Safari on Mac OSX) helpfully autocorrects my python code into something that looks more like English. This is inconvenient, and also gaslights the user into thinking that they can't type.

In html you can turn off spellchecking in input fields.
http://stackoverflow.com/questions/3416867/how-can-i-disable-the-spell-checker-on-text-inputs-on-the-iphone

@Carreau
IPython member
@Carreau
IPython member
@minrk
IPython member
minrk commented Mar 27, 2013

What are your Safari and OS X versions?

@dmopalmer

OSX 10.8.3
Safari 6.0.3
iPython 0.13.1 installed with MacPorts on
2.7.3 (default, Nov 17 2012, 19:54:34)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))]

A text area shows
(left angle)textarea style="position: absolute; padding: 0px; width: 1px; height: 1em; " wrap="off" autocorrect="off" autocapitalize="off"(right angle)
(You may want to turn off autocomplete as well for this fix.)

BUT look at the attached screenshot.
Screen Shot 2013-03-27 at 9 14 55 PM

The div style="overflow....../div that has autocorrect off is not the div that I am typing into, if I read the highlighting properly. That division has height of 0pix.

Instead it seems I am typing into the div class="CodeMirror-scross cm-s-ipython". Unfolding this in the element inspector does not find any autocorrect="off" tags in this div.

@minrk
IPython member
minrk commented Mar 28, 2013

The only relevant attribute, based on my tests, seems to be spellcheck="false" (spellcheck="off" doesn't work, and autocorrect does not seem to have any effect either).

You are actually typing in that textarea tag, it's CodeMirror's magic that means what you click on is not actually where you are typing.

@minrk
IPython member
minrk commented Mar 28, 2013

Can you give #3102 a try?

@minrk minrk added a commit that closed this issue Apr 1, 2013
@minrk minrk set `spellcheck=false` in CodeCell inputarea
prevents autocorrect from firing in Safari (weirdly, autocorrect does not have this effect).

Note: must be `false`, not `off`

closes #3087
b1d999c
@minrk minrk closed this in b1d999c Apr 1, 2013
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
@minrk minrk set `spellcheck=false` in CodeCell inputarea
prevents autocorrect from firing in Safari (weirdly, autocorrect does not have this effect).

Note: must be `false`, not `off`

closes #3087
8aee307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.