Hi,
The commit on wicket-ajax.js
---------------------------
Revision: 628015
Author: jcompagner
Date: 12:20:39, vrijdag 15 februari 2008
Message:
fix for FF that sometimes when using iframes mixes up the base url (it does a ajax get to the url thats in the location bar of the browser instead what is in the iframe)
----
Modified : /wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
---------------------------

breaks the modalwindow when using it in a portlet,
because the ajax-get adds an extra / to the request resulting in an extra slash. (the url for the resource is "/.../...wicket-event.js")
So you get http://foo.bar//../..wicket-event.js

proposed patch:

wicket-ajax.js line 824

if (Wicket.Browser.isGecko()) {
 var href = document.location.href;
 var lastIndexOf = href.lastIndexOf('/');
var firstIndexOf = url.indexOf('/'); if (lastIndexOf > 0 && firstIndexOf > 0)
 {
   url = href.substring(0,lastIndexOf+1) + url;
 }
}


Thijs

Reply via email to