You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "André Winkler (JIRA)" <ji...@apache.org> on 2008/01/07 12:49:34 UTC

[jira] Created: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Close ModalWindow in IE with scrollbars scrolls to bottom
---------------------------------------------------------

                 Key: WICKET-1265
                 URL: https://issues.apache.org/jira/browse/WICKET-1265
             Project: Wicket
          Issue Type: Bug
          Components: wicket-extensions
    Affects Versions: 1.3.0-final
         Environment: Windows XP with Internet Explorer 7
            Reporter: André Winkler
            Priority: Critical


The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.

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);
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576732#action_12576732 ] 

Matej Knopp commented on WICKET-1265:
-------------------------------------

I've committed a possible fix. Can anyone test it?

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Assignee: Matej Knopp
>            Priority: Critical
>             Fix For: 1.3.2
>
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576556#action_12576556 ] 

Matej Knopp commented on WICKET-1265:
-------------------------------------

I don't really think this is a good fix. Better solution would be to just absolute position the element and make sure it is in the viewport. Too bad we can't use position:fixed in IE6. I'll try to take a look at this today.

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Assignee: Matej Knopp
>            Priority: Critical
>             Fix For: 1.3.2
>
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matej Knopp resolved WICKET-1265.
---------------------------------

    Resolution: Fixed

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Assignee: Matej Knopp
>            Priority: Critical
>             Fix For: 1.3.3
>
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Ryan Donahue (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560458#action_12560458 ] 

Ryan Donahue commented on WICKET-1265:
--------------------------------------

This is a problem for us too.  As you can see in this video, http://www.utipu.com/app/tip/id/536/ , it's probably a little jarring for users.

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Priority: Critical
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Vjacheslav Kanivetc (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576949#action_12576949 ] 

Vjacheslav Kanivetc commented on WICKET-1265:
---------------------------------------------

I've tested the fix you have provided, it's working perfectly ;)
Hoping to see it in 1.3.2 version release already.

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Assignee: Matej Knopp
>            Priority: Critical
>             Fix For: 1.3.3
>
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Vjacheslav Kanivetc (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572051#action_12572051 ] 

Vjacheslav Kanivetc commented on WICKET-1265:
---------------------------------------------

Yes, that is really a problem.
However the fix provided by André Winkler is not the best, since in this case the window will be scrolled to the beginning. In most cases that's ok, but there could be rare occasions when this is undesired, thus a better fix should be estimated as well, for example, giving a this.window.parentNode there instead of the document.body.firstChild and moving the while bunch of code upper while parentNode still exists.

But anyhow, even the provided quick-fix is a good solution for most users, so it would be really nice to be incorporated to 1.3.2 ;0

BTW, the same problem is also with IE 6.0 (tested from w2003 server), so the problem is not IE7 only - the focus fix is buggy in all cases when used :).

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Priority: Critical
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner updated WICKET-1265:
------------------------------------

    Fix Version/s: 1.3.2
         Assignee: Matej Knopp

matej can we fix this for 1.3.2?

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Assignee: Matej Knopp
>            Priority: Critical
>             Fix For: 1.3.2
>
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1265) Close ModalWindow in IE with scrollbars scrolls to bottom

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1265:
---------------------------------------

    Fix Version/s:     (was: 1.3.2)
                   1.3.3

> Close ModalWindow in IE with scrollbars scrolls to bottom
> ---------------------------------------------------------
>
>                 Key: WICKET-1265
>                 URL: https://issues.apache.org/jira/browse/WICKET-1265
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: Windows XP with Internet Explorer 7
>            Reporter: André Winkler
>            Assignee: Matej Knopp
>            Priority: Critical
>             Fix For: 1.3.3
>
>
> The actual Site is too long, so the Internet Explorer shows ScrollBars. If I show now a ModalWindow and close this, Wicket scrolls to bottom of the site.
> 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);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.