1
1 connu
Hi,
I dont have any knowlegde of Js.
But I have a problem with javascript using a java web framework. It's about
a modal window component.
When closing the modal window, the original page scrolls downs to the
bottom. This come from a Internet Explorer bug. Everything is ok with
Firefox.
I found a patch for solving the problem in
https://issues.apache.org/jira/browse/WICKET-1265
I have try to used this patch without any success :
I analyzed the javascript code of the ModalWindow (modal.js) and the
problem is by the solution of the focus problem:
if (Wicket.Browser.isIE()) {
// There's a strange focus problem in IE that disables focus on entire
page,
// unless something focuses an input
var e = document.createElement("input");
document.body.appendChild(e);
e.focus();
document.body.removeChild(e);
}
The better solution, that ie don't scrolls to bottom, is:
if (Wicket.Browser.isIE()) {
// There's a strange focus problem in IE that disables focus on entire
page,
// unless something focuses an input
var e = document.createElement("input");
document.body.insertBefore(e, document.body.firstChild);
e.focus();
document.body.removeChild(e);
}
I encosed the modal.js. Thanks in advance for any help.
Pierre
I dont have any knowlegde of Js.
But I have a problem with javascript using a java web framework. It's about
a modal window component.
When closing the modal window, the original page scrolls downs to the
bottom. This come from a Internet Explorer bug. Everything is ok with
Firefox.
I found a patch for solving the problem in
https://issues.apache.org/jira/browse/WICKET-1265
I have try to used this patch without any success :
I analyzed the javascript code of the ModalWindow (modal.js) and the
problem is by the solution of the focus problem:
if (Wicket.Browser.isIE()) {
// There's a strange focus problem in IE that disables focus on entire
page,
// unless something focuses an input
var e = document.createElement("input");
document.body.appendChild(e);
e.focus();
document.body.removeChild(e);
}
The better solution, that ie don't scrolls to bottom, is:
if (Wicket.Browser.isIE()) {
// There's a strange focus problem in IE that disables focus on entire
page,
// unless something focuses an input
var e = document.createElement("input");
document.body.insertBefore(e, document.body.firstChild);
e.focus();
document.body.removeChild(e);
}
I encosed the modal.js. Thanks in advance for any help.
Pierre