Bug Tracker

Opened 12 years ago

Closed 9 years ago

Last modified 8 years ago

#2181 closed bug (fixed)

JQuery fails to execute search in pages containing applets.

Reported by: cesare Owned by:
Priority: major Milestone: 1.2.4
Component: core Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:

Description

When a given page contains an applet, $(query) fails when it traverses the applet node. Probably because it is a special node which does not have the same properties that common HTML nodes. In JQuery 1.1.4 this can be avoided just ignoring tag named "applet" in search routines. The patch in question looks like:


isXMLDoc: function(elem) {

if (elem.tagName && elem.tagName.toLowerCase() == 'applet') return false; hernan rancati -- patch

return elem.documentElement && !elem.body

elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;

}


thanks, and have a good day,

Hernan Rancati.

Attachments (3)

jquery-1.2.1.js (81.8 KB) - added by cesare 12 years ago.
jquery 1.2.1 patched to work with applets.
test.html (409 bytes) - added by cesare 12 years ago.
test page to reproduce the bug.
jQuery with Applet.zip (31.7 KB) - added by batboyz 11 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by davidserduke

Milestone: 1.2.11.2.3

Changed 12 years ago by cesare

Attachment: jquery-1.2.1.js added

jquery 1.2.1 patched to work with applets.

Changed 12 years ago by cesare

Attachment: test.html added

test page to reproduce the bug.

comment:2 Changed 12 years ago by cesare

in order to reproduce the bug , have to put a working applet in the same directory where html test page is located (eg. excelsos-upload.jar). The file is missing here due to file size limitation.

comment:3 Changed 12 years ago by flesler

Milestone: 1.2.31.2.4
Resolution: fixed
Status: newclosed

I don't quite get the:

$("[xBindRows][xCloned]").html()

I just closed another ticket about applets, it turned to be already fixed now.

Could you retry this ?

I'll close for now, reopen if you still find this issue.

comment:4 Changed 11 years ago by batboyz

Resolution: fixed
Status: closedreopened

Error: undefined is not a function Line 1166. The error occured on a page containing object tags for applets, using jQuery version 1.2.6.

comment:5 Changed 11 years ago by batboyz

Additional info: Error only happened on Firefox 2, but not on Firefox 3, IE6/7.

comment:6 Changed 11 years ago by flesler

need: ReviewTest Case

Hi, don't reopen the ticket if it has nearly no relation to your problem, you can create a new one instead.

You need to give us more details so we can check this out. Can you provide a test case ? that is, a small html file with the minimum html/css/js necessary to reproduce the problem.

Changed 11 years ago by batboyz

Attachment: jQuery with Applet.zip added

comment:7 Changed 11 years ago by batboyz

Hi, I thought it may be related, since the problem is because there is an applet embedded on the page. I've attached a zip file containing a test html, jQuery 1.2.6, and a sample applet. With this applet the error that I got was

Error: Java class AudioPlayerApplet has no public field or method named "jQuery1216045419515" Line: 666

The error is not the same as what I've mentioned in my previous post, because for some reason there is no such undefined error if I'm using the attached applet.

comment:8 Changed 9 years ago by dmethvin

Resolution: invalid
Status: reopenedclosed

This ticket has a confusing history, but I think the original problem was resolved.

comment:9 Changed 9 years ago by dmethvin

Resolution: invalid
Status: closedreopened

comment:10 Changed 9 years ago by dmethvin

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.