ICEfaces
  1. ICEfaces
  2. ICE-1915

submit broken after link window.open() navigation in IE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      win xp

      Description

      If you use a link to open a new window in IE:

      <a href="javascript:void(window.open('/Forum-5165/second.jspx', 'secondWindow', 'location=0,menubar=0,resizable=0,width=500,height=450,scrollbars=1'))">Link </a>

      This will open a new window. If you go back to the first page in IE, the submits are broken and the page will be non-functional. Works ok in Firefox

        Issue Links

          Activity

          Hide
          Philip Breau added a comment -

          test case

          Show
          Philip Breau added a comment - test case
          Hide
          Ted Goddard added a comment -

          What does the ICEfaces JavaScript console show when you interact with the broken form?

          Show
          Ted Goddard added a comment - What does the ICEfaces JavaScript console show when you interact with the broken form?
          Hide
          Ted Goddard added a comment -

          Assigning to Philip since he has the example running and should be able to fill in the ICEfaces console details.

          Show
          Ted Goddard added a comment - Assigning to Philip since he has the example running and should be able to fill in the ICEfaces console details.
          Hide
          Philip Breau added a comment -

          The page is unloaded in IE whereas it isn't in Firefox:

          IE:

          1:28:34 debug [window.sync-connection] : [3866245] : send asynchronous POST1:28:34 debug [window.sync-connection] : [3866245] : receive [200] OK1:28:34 debug [window] : applied update : <script id="dynamic-code" language="javascript">var c = function()

          {Ice.Focus.setFocus('_id10:_id14');}

          ;if(window.application)

          {c();}else{window.onLoad(c)};//-598164228</script>1:28:34 debug [window.synchronizer] : mark document as modified1:28:34 debug [window.stateMon] : Checking [0] monitors1:28:34 debug [window.stateMon] : Rebuilding Monitors [0]1:28:34 debug [window.stateMon] : Rebuilding Monitors [0]1:28:34 debug [window] : Focus Set on [_id10:_id14]1:28:38 debug [window] : Interup pressed1:28:38 debug [window] : User action. Set focus will be ignored.1:28:38 debug [window.sync-connection] : [4708715] : send asynchronous POST1:28:38 info [window] : page unloaded!

          Firefox:

          [window.sync-connection] [2223747] : send asynchronous POSTicefaces-d2d.js (line 1044)
          POST http://localhost:8080/Forum-5165/block/send-receive-updates (62ms)icefaces-d2d.js (line 1163)
          [window.sync-connection] [2223747] : receive [200] OKicefaces-d2d.js (line 1044)
          [window] applied update : <script id="dynamic-code" language="javascript">var c = function(){Ice.Focus.setFocus('_id10:_id14');};if(window.application){c();}

          else

          {window.onLoad(c)}

          ;//-92290223</script>icefaces-d2d.js (line 1044)
          [window.stateMon] Checking [0] monitorsicefaces-d2d.js (line 1044)
          [window.stateMon] Rebuilding Monitors [0]icefaces-d2d.js (line 1044)
          [window.stateMon] Rebuilding Monitors [0]icefaces-d2d.js (line 1044)
          [window] Focus Set on [_id10:_id14]icefaces-d2d.js (line 1044)
          [window] Interup pressedicefaces-d2d.js (line 1044)
          [window] User action. Set focus will be ignored.

          Show
          Philip Breau added a comment - The page is unloaded in IE whereas it isn't in Firefox: IE: 1:28:34 debug [window.sync-connection] : [3866245] : send asynchronous POST1:28:34 debug [window.sync-connection] : [3866245] : receive [200] OK1:28:34 debug [window] : applied update : <script id="dynamic-code" language="javascript">var c = function() {Ice.Focus.setFocus('_id10:_id14');} ;if(window.application) {c();}else{window.onLoad(c)};//-598164228</script>1:28:34 debug [window.synchronizer] : mark document as modified1:28:34 debug [window.stateMon] : Checking [0] monitors1:28:34 debug [window.stateMon] : Rebuilding Monitors [0] 1:28:34 debug [window.stateMon] : Rebuilding Monitors [0] 1:28:34 debug [window] : Focus Set on [_id10:_id14] 1:28:38 debug [window] : Interup pressed1:28:38 debug [window] : User action. Set focus will be ignored.1:28:38 debug [window.sync-connection] : [4708715] : send asynchronous POST1:28:38 info [window] : page unloaded! Firefox: [window.sync-connection] [2223747] : send asynchronous POSTicefaces-d2d.js (line 1044) POST http://localhost:8080/Forum-5165/block/send-receive-updates (62ms)icefaces-d2d.js (line 1163) [window.sync-connection] [2223747] : receive [200] OKicefaces-d2d.js (line 1044) [window] applied update : <script id="dynamic-code" language="javascript">var c = function(){Ice.Focus.setFocus('_id10:_id14');};if(window.application){c();} else {window.onLoad(c)} ;//-92290223</script>icefaces-d2d.js (line 1044) [window.stateMon] Checking [0] monitorsicefaces-d2d.js (line 1044) [window.stateMon] Rebuilding Monitors [0] icefaces-d2d.js (line 1044) [window.stateMon] Rebuilding Monitors [0] icefaces-d2d.js (line 1044) [window] Focus Set on [_id10:_id14] icefaces-d2d.js (line 1044) [window] Interup pressedicefaces-d2d.js (line 1044) [window] User action. Set focus will be ignored.
          Hide
          Ted Goddard added a comment -

          Why does the POST occur on IE just before the window.unloaded? This may be a clue to the problem.

          Show
          Ted Goddard added a comment - Why does the POST occur on IE just before the window.unloaded? This may be a clue to the problem.
          Hide
          Mircea Toma added a comment -

          IE fires document.onbeforeunload when an achor refering to another page is clicked (see http://msdn2.microsoft.com/en-us/library/ms536907.aspx ). ICEfaces relies on this event to dispose the server-side views, thus the view backing up the first page will be disposed when the link is clicked.

          A fix is not really possible since the 'onbeforeunload' event handler cannot differentiate between a real page unload and a click on an anchor reffering to another page.

          The workaround is to change the link slightly to:

          <a href="#" onclick="window.open('calendar.jspx', 'secondWindow','location=0,menubar=0,resizable=0,width=500,height=450,scrollbars=1');">2nd window</a>

          Show
          Mircea Toma added a comment - IE fires document.onbeforeunload when an achor refering to another page is clicked (see http://msdn2.microsoft.com/en-us/library/ms536907.aspx ). ICEfaces relies on this event to dispose the server-side views, thus the view backing up the first page will be disposed when the link is clicked. A fix is not really possible since the 'onbeforeunload' event handler cannot differentiate between a real page unload and a click on an anchor reffering to another page. The workaround is to change the link slightly to: <a href="#" onclick="window.open('calendar.jspx', 'secondWindow','location=0,menubar=0,resizable=0,width=500,height=450,scrollbars=1');">2nd window</a>

            People

            • Assignee:
              Unassigned
              Reporter:
              Philip Breau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: