Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1265

Close ModalWindow in IE with scrollbars scrolls to bottom

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-final
    • Fix Version/s: 1.3.3
    • Component/s: wicket-extensions
    • Labels:
      None
    • Environment:
      Windows XP with Internet Explorer 7

      Description

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

        Attachments

          Activity

            People

            • Assignee:
              knopp Matej Knopp
              Reporter:
              andre.winkler@hispeed.ch André Winkler
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: