8 Replies Latest reply on Feb 23, 2011 5:28 PM by H G

    When ModalPanel opens in iFrame, scroll bar moves up

    Andreas Panagiotidis Novice

      I have a page which has an iframe (iframe scrolling = disabled).

      The iframe page contains among others a RichFaces modalPanel.

       

      (In case that the outer scrollbar is visible) when I open the modalPanel the scroll bar moves up, so that the top of the iframe is visible.


      I don't know how to disable this behaviour without changing the modalPanel.js.

       

      The reason this happens is:

       

      The modalPanel.js has in the show() method the command:

      this.lastOnfocus();

       

      This command set the focus on the this.lastHref (id + "LastHref") component which is a hidden button placed on top of the page that contains the modalPanel.

       

      Does anybody knows how to disable this.lastOnfocus

       

      To be honest, I haven't investigated what the lastOnfocus offers, but common sense says it is needed.

       

      For the time being there is no "parameter" to regulate whether this.lastOnfocus is called.

       

      What do you think of creating a parameter that enables/disables lastOnfocus?