Opened 14 years ago

Closed 14 years ago

#540 closed defect (fixed)

Exceptions in Firefox, look at changeset [372]

Reported by: Kim Steinhaug Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords:
Cc:

Description (last modified by wymsy)

btn.state("active", (!text && doc.queryCommandState(cmd)));

This line fires alot of exceptions in Firefox when the editor is focused, look at ticket #539, second comment for typical errors. I took the liberty to remove this line from the code, atleast it fixes the symptoms...

Change History (4)

comment:1 Changed 14 years ago by wymsy

  • Description modified (diff)

But it breaks the feature of highlighting the B, I U and text alignment buttons to show the state of the current selection (in FF). I don't see the problem occurring on my system. Does it only show up in non-english configurations? Or with certain plugins? Can you post a configuration that demonstrates the problem?

comment:2 Changed 14 years ago by gogo

  • Component changed from Documentation to Xinha Core
  • Owner changed from akaEdge to gogo

To stop the exceptions, you'd be better to use a try{}catch(){} block around the exception inducing code rather than remove it.

Of course, doesn't explain why it's excepting in the first place, the error in #539 would seem to indicate that querCommandState wasn't implmented on the document in question, which seems strange. But perhaps that could happen if the document wasn't (yet) editable for some reason... don't know.

comment:3 Changed 14 years ago by gogo

ie.

try
{
  btn.state("active", (!text && doc.queryCommandState(cmd)));
}
catch(e) { /* Do nothing */ }

comment:4 Changed 14 years ago by gogo

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

I have a feeling that the recent implementation of waiting until the document is ready may fix this. In any case, somebody has implemented the try-catch now so I'll close this.

Note: See TracTickets for help on using tickets.