Bug 20775 - Incompatibility with FF when handle 'object' tag
Summary: Incompatibility with FF when handle 'object' tag
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://j2e.com/new&beta
Keywords:
: 20776 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-10 19:22 PDT by Feng Qian
Modified: 2023-12-18 04:16 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Feng Qian 2008-09-10 19:22:36 PDT
The  reported URL works in FF and not in Safari. The expected behavior in FF is that, after editing the text area, and close the window, it should alert the user whether s/he wants to discard changes.

In Safari, the JS code of 'document.j2e.changed()' throws an exception because 'document.j2e' is undefined. The HTML source is incorrect in this case. It looks like

<object id="j2e" ... >
<param> ...
<param>

some text here

It misses </object> to close the tag. WebKit determines that an HTMLObjectElement is not a docNamedNode (see code in HTMLObjectElement::updateDocNamedItem) because it thinks
the object element has child that's text node and with non-whitespace texts.

I did further test by closing <object> with </object>, but put some text between, or put a non-param tag between. FF allows 'document.j2e' but Safari doesn't.

After chatting with Maciej in IRC channel, he mentioned the rule for HTMLObjectElement was to handle a common error (?) that <embed> element is put between <object> and </object>.
Comment 1 Feng Qian 2008-09-10 20:27:22 PDT
*** Bug 20776 has been marked as a duplicate of this bug. ***
Comment 2 Anne van Kesteren 2023-12-18 04:16:43 PST
It's unclear how to reproduce this now the website is gone. But also plugins have been removed which suggests this is probably no longer an issue.