Issue Details (XML | Word | Printable)

Key: WICKET-506
Type: Bug Bug
Status: Closed Closed
Resolution: Invalid
Priority: Major Major
Assignee: Unassigned
Reporter: Nick Johnson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Wicket

ModalWindow + MSIE fails

Created: 26/Apr/07 05:30 AM   Updated: 28/May/07 09:23 PM
Return to search
Component/s: wicket-extensions
Affects Version/s: 1.2.6
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 26/Apr/07 04:50 PM


 Description  « Hide
IE 6 and 7 fail to launch a ModalWindow... at first I thought this was due to AjaxFallbackLink since the Wicket-Examples page works, but that turned out to be a red herring.

Something else is afoot. Still trying to narrow it down, but the culprit looks like some kind of parsing problem after the Ajax response is received.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Nick Johnson added a comment - 26/Apr/07 02:33 PM
Incidentally, things also work beautifully in Opera.

Nick Johnson added a comment - 26/Apr/07 03:14 PM
Switched back to development mode on my workstation and pulled up the Ajax debug window. IE is actually calling the proper function:

INFO:
INFO: Initiating Ajax GET request on /tally-ho/article?wicket:interface=:2:11::&wicket:behaviorId=0&random=0.22414584417865696
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (962 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="fragment_forum_tree_entry_0_fragment_nav_replyOrNot_replyWindow" ><![CDATA[<span style="display:none" id="fragment_forum_tree_entry_0_fragment_nav_replyOrNot_replyWindow">
<div id="fragment_forum_tree_entry_0_fragment_nav_replyOrNot_replyWindow_content">
</div>
</span>]]></component><evaluate><![CDATA[var settings = new Object();
settings.minWidth=200;
settings.minHeight=200;
settings.className="w_silver";
settings.width="600";
settings.height="400";
settings.resizable=true;
settings.src="/tally-ho/article?wicket:interface=modal-dialog-pagemap:0:1::";
settings.iframeName="modal-dialog-pagemap";
settings.title="Reply Window";
settings.mask="semi-transparent";
settings.onClose = function() { var wcall=wicketAjaxGet('/tally-ho/article?wicket:interface=:2:16::&wicket:behaviorId=1', function() { }, function() { }); };
Wicket.Window.create(settings).show();
]]></evaluate></ajax-response>
INFO: Response parsed. Now invoking steps...
ERROR: Error while parsing response: Unknown runtime error
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...

So it looks like something is going wrong after it receives the ajax response.

Nick Johnson added a comment - 26/Apr/07 04:50 PM
This turned out to be caused by using <span> to placehold for the modal window instead of <div>.

Upon further debugging it was also discovered that MSIE 7 will not display the contents of an iframe until the iframe is resized if the HTML element has position: relative set in CSS.

Nick Johnson added a comment - 26/Apr/07 04:50 PM
Would be good to add a documentation note indicating that <div> must be used, not <span>, to hold the place for the modal window.

Alastair Maw added a comment - 22/May/07 03:46 PM
Augmented javadoc appropriately (r540613).

Jonathan Locke added a comment - 28/May/07 09:23 PM
If it doesn't work attached to anything but a DIV shouldn't the component throw an exception if it's attached to the wrong thing? Relying on javadoc here is not going to be very bulletproof. Until I started searching for modalwindow bugs, I never would have known this...