Bug Tracker

Modify

Ticket #1187 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

IE: removing of #__ie_init in a FRAMESET causes weird loading of another frame (SVN)

Reported by: blueyed Owned by: brandon
Priority: major Milestone: 1.1.3
Component: event Version: 1.1.2
Keywords: Cc:
Blocking: Blocked by:

Description

I've experienced the following problem using jQuery SVN and Internet Explorer 6.

If you have a frameset with two frames, the back/forward buttons behave weird: they cause a page to get loaded in a frame which does not belong there (and was not displayed there, before going to another link and pressing back).

I will attach files for testing this:

  1. Extract the attachment to a directory
  2. Put jquery.js into the directory (or adjust the path(s))
  3. Open frameset_1.html in Internet Explorer
  4. Click on "2" in the top frame
  5. This will open frameset_2.html
  6. Click "Back"
  7. You will see "frame_b_2.html" in the top frame, instead of frame_a.html

This is caused by the following jQuery code:

jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });

which was added because of ticket #1061.

My hacky solution for this was adding

if( ! window.frames.length )

before it, so that the code won't get used for FRAMESETs.

The real fix probably is to not include jQuery in a FRAMESET page at all, but if it gets done it should not cause this weird behaviour.

Attachments

weird-ie-frame-test.zip Download (1.4 KB) - added by blueyed 7 years ago.
testcase

Change History

Changed 7 years ago by blueyed

testcase

comment:1 Changed 7 years ago by blueyed

Like already mentioned in #1061, it would maybe be the best option to just always leave the ie_init-Hack-Script in the DOM, wouldn't it? At least it has caused two different problems until now.

comment:2 Changed 7 years ago by john

  • need changed from Review to Patch
  • Owner changed from john to brandon
  • Component changed from core to event

I bet this could be fixed by doing jQuery(self) instead of jQuery(window).

comment:3 Changed 7 years ago by blueyed

No, unfortunately not. At least not for the provided testcase.

comment:4 Changed 7 years ago by brandon

Other than not cleaning up what are the problems (if any) of leaving the script tag in the DOM?

comment:5 Changed 7 years ago by brandon

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

Fixed in Rev [2136].

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.