Opera 7.2x bug?

Wednesday, March 31, 2004 at 6:31 am | Comments off

I was recently notified that my form highlighting effect did not work in Opera 7.2x. As far as I can tell, it is a bug with Opera, that doesn't allow JavaScript functions to be run when the XHTML is sent as an application of XML (application/xhtml+xml), as it is on most of the pages on this site. All blog pages are, as well as any other “normal links.” (Some of the test pages are not, but I'm getting to that.)

If you are using Opera 7.2x, scroll down to the comment area, and place the focus on one of the form fields. There should be a Safari-like blue border around it. However, there won't be. Now, take a look at this page. Since that is one of the test pages mentioned above, it is sent as text/html rather than application/xhtml+xml. I was able to view the highlighting just fine, in Opera 7.23.

While testing to figure out what was going on, I found that inline scripts worked fine. For instance onclick="alert('test');" would indeed alert “test”, but onclick="someFunction();" would do nothing at all.

I realize that not many people send their content as an application of XML, so for most people, this won't be an issue. However, I'm wondering if anyone has any insight on this (maybe I'm just missing something major!). What do you think? Is this a bug?


March 31st, 2004
11:14 AM | #

Probably not a bug but a "feature" ;-)

Robert Wellock
March 31st, 2004
1:01 PM | #

It has been well-documented that Opera has patchy support for JavaScript/XML DOM when XHTML 1.1 is served correctly.

March 31st, 2004
1:15 PM | #

No, it's a bug, and it has been fixed in 7.50 previews. However, from an XML viewpoint there is an explanation for why the script element should not be executed: There is no XML way of attaching such an execution behavior to the contents of an element. You'd need a processing instruction for it, or have to use XLink or something similar. This same behavior (or lack thereof) can be observed in Safari as well, though the WebCore based OmniWeb versions does not exhibit it.

March 31st, 2004
6:32 PM | #

Hehe. That's sweet, Ryan. It's like Safari... without Safari.

March 31st, 2004
10:14 PM | #

It's good for those of us on Windows wishing for OS X, anyway. ;)

Comments are automatically closed after 45 days