WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8021 closed defect (bug) (wontfix)

Firefox spell checker not working in contentEditable areas

Reported by: Otto42 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: General Keywords: needs-patch
Focuses: Cc:

Description

Trunk.
Use Visual Editor.
Enter bad spelling. I use "This is a hgihd test."
Note that hgihd is not underlined in Firefox 3.0.3.
Right click field, turn off spell checking.
Right click field, turn it on again. Word will become underlined.

This is basically the same problem as #3856. The solution there was to force gecko_spellcheck to true. I checked the code, and that solution is still in there, so somewhere, a change to the TinyMCE code must be disabling this. I notice some code in the TinyMCE advanced theme that has comments along these lines, but I am not familiar enough with TinyMCE to work out what that does.

Change History (20)

comment:1 1125025 years ago

Stranger behavior is that it will work on the first word if the first word is misspelled, but not on subsequent words.

It doesn't default on at all under IE7... and never has, to my memory. I always click the button.

So is this a bug, or by design?

comment:2 azaozz5 years ago

This seems to be affected somehow by the editor's internal iframe css, couldn't find a definite pattern though.

comment:3 azaozz5 years ago

(In [9917]) Several TinyMCE fixes and adjustments: Gecko spellchecker, Gallery options, single quote in image captions, see #8021

comment:4 westi5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Works for me in FF 3.0.4 on OS X 10.4.11

comment:5 1125025 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, what? What was fixed? It exhibits the exact same behavior on FF/Win ... no change whatsoever.

Firefox: New Post -> "This is a hgihd test" -> Nothing spell checked.
Firefox: New Post -> "hgihd This is a test" -> 'hgihd' highlighted
IE : New Post -> "This is a hgihd test" -> Nothing checked.
IE : New Post -> "hgihd This is a test" -> Nothing checked.

So now the question is --- is it supposed to auto-check? Or are you supposed to hit the button? Because now you guys are saying it's fixed, when no behavior has changed. ;-)

comment:6 1125025 years ago

Futher ....

FF: New Post -> "This hgdhs test" -> Nothing checked.

FF: New Post -> "hgdhs this test" -> 'hgdhs' highlighted

FF: New Post -> "hgdhs test shdg" -> 'hgdhs' highlighted

If you click the Spell Check button twice, both 'hgdhs' and 'shdg' are highlighted.

In IE, you only have to click the button once, and both will be highlighted.

comment:7 azaozz5 years ago

  • Milestone changed from 2.7 to 2.8
  • Summary changed from Firefox spell checker not working with RTE, again to Firefox spell checker not working in contentEditable areas

This seems to be a problem in contentEditable areas in FF that only triggers sometimes, can't see any pattern to it though. Sending upstream.

comment:8 1125025 years ago

Why not unify the functionality across browsers, and set Autocheck to off? It always works correctly when you hit the button, and that way, you'd only have to hit it once instead of twice... and it could make it into 2.7. ;-)

comment:9 novasource5 years ago

  • Cc novasource added
  • Keywords spellcheck spell check firefox added
  • Severity changed from normal to major

Confirming that I get this behavior a lot. Firefox 3.0.x's built in spell check on WordPress 2.7 is intermittent and random. Seems worst when typing new post, but sometimes happens intermittently when revising existing post.

Being bold and bumping to "major" severity because A. I'll bet proper spelling is important to most people and B. Firefox's spell check works in other apps.

comment:10 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; spellcheck spell check firefox removed

comment:11 ranchnachos5 years ago

After reading this thread I wonder how this is related to Wordpress?
You're talking about Firefox's built in spell checker and TinyMCE. Both of which have nothing to do with Wordpress code. (Granted WP does integrate TinyMCE)

If words underline noting misspellings while using TinyMCE maybe you should contact Firefox or TinyMCE devs, or both.

also, since this isn't my thread.. I would suggest someone change this to a severity of Minor or Trivial.

just my 2 cents.

comment:12 1125025 years ago

It has nothing to do with Firefox's spell checker. It's an issue with the "correct" behavior of the JavaScript, which seems to works properly in IE and not in Firefox.

comment:13 azaozz5 years ago

  • Component changed from TinyMCE to General
  • Milestone changed from 2.8 to Future Release
  • Severity changed from major to normal

No, this seems to be Firefox spellchecker/iframe/contentEditable bug that has been around for a long time (since FF 1.5 I think). It's intermittent and hard to build test case for.

Did quite a bit of testing some time ago trying to determine what triggers it but couldn't pinpoint it exactly. Seems to be affected by some specific css and/or js dom manipulations but not consistently. Seen something similar happen in some versions of Thunderbird too although the cause may be unrelated.

The spellchecker in WebKit browsers seems to work properly.

+1 to closing this as invalid. If someone comes up with a workaround I'll be glad to add it but don't think this is WordPress bug.

comment:14 1125025 years ago

Umm ... It uses GoogleSpell, not the Firefox Spellchecker.

As I've mentioned multiple times, disabling auto-check fixes the issue, and makes the the behavior consistent on both browsers. In clicking the button or right-click Spell Check on Firefox, it worked perfectly fine every time.

It's only when you're using the onLoad event there's a problem.

Change "if(!s.gecko_spellcheck)t.getBody().spellcheck=0;" to "spellcheck=0". Done. Finished. No problem. ;-)

Turn on the Spellchecker, it works every single time.

comment:15 follow-up: 1125025 years ago

Sorry, let me try that again ---

I've asked before what was the intended behavior: was it supposed to auto-check in both browsers and work, or was it supposed to rely on the user clicking a button?

There are too many tangents in this thread.

The correct behavior (I'm sorry, I messed up a little there) ... would be have Browser Consistency and have the Spell Check work, correct?

Easy --- change tiny_mce.js:

if(!s.gecko_spellcheck)t.getBody().spellcheck=0;

To:

t.getBody().spellcheck=0;

Problem solved.

Browser Consistency ... Working Spell Checker.

comment:16 Denis-de-Bernardy5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

closing as wontfix per andrew's suggestion. to those who are affected: please report this upstream to moxiecode (TinyMCE's developers).

comment:17 Denis-de-Bernardy5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:18 Denis-de-Bernardy5 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

comment:19 in reply to: ↑ 15 azaozz5 years ago

Replying to 112502:

... Browser Consistency ... Working Spell Checker.

By browser consistency you mean turning off the built-in spellchecker in Firefox, Safari and Chrome because IE doesn't have one? Don't think so.. Everyone expects to have a spellchecker in all textareas except IE users.

This seems to be a Firefox issue, not TinyMCE's.

comment:20 1125025 years ago

Actually, no. It's hit or miss which browsers that it "automatically" starts in. In Firefox, it's broken when it automatically starts, and not working at all. Thus, for "browser consistency," turning off the Auto-Start made complete sense, especially given that the spell check actually WORKS when you hit the button.

I wish some of you had just answered the funtionality question --- "is it supposed to auto-check? Or are you supposed to hit the button?" from five months ago --- instead of being so ridiculously pedantic about it now. Because, well, even still --- it's never been answered, and from a Dev perspective, it's something that needs to be addressed, rather than just voting it off the island.

Basically, this has gone way off topic. Blame whatever ... meanwhile, there's a valid fix there that makes it work on every browser out there. But oh well. *shrug*

Note: See TracTickets for help on using tickets.