Dialog positioning broken when positionType is absolute and page is scrolled?

UI Components for JSF
Post Reply
mbeedub
Posts: 93
Joined: 28 Jan 2010, 23:54

23 May 2018, 10:15

Taking some code from the showcase for dialog and adding positionType="absolute" breaks the vertical positioning of the dialog when page scrolling is involved:

Code: Select all

      ....
       lots of content (e.g. 100 x <br />)
      ......
      <h:panelGrid columns="1" cellpadding="5">
        <p:commandButton value="Modal" type="button" onclick="PF('dlg2').show();" />
      </h:panelGrid>

      <p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true" height="100" positionType="absolute" >
        <h:outputText value="This is a Modal Dialog." />
      </p:dialog>
In the example above, after scrolling to the bottom of the page to click the button which shows the dialog, the modal appears at the bottom of the page. "Forcing" position="central" makes no difference. If you remove positionType="absolute" it all works fine.

I think this may have been broken from 6.2.
Last edited by mbeedub on 23 May 2018, 15:30, edited 1 time in total.
JBoss EAP 6.4.0 | Mojarra 2.1.28 | PrimeFaces 6.2.3

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

23 May 2018, 15:11


mbeedub
Posts: 93
Joined: 28 Jan 2010, 23:54

23 May 2018, 15:28

Code: Select all

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui">

<h:head>
</h:head>

<h:body>

  <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

  <p:commandButton value="Modal" type="button" onclick="PF('dlg2').show();" />

  <p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true" positionType="absolute">
    <h:outputText value="This is a Modal Dialog." />
  </p:dialog>

</h:body>

</html>
JBoss EAP 6.4.0 | Mojarra 2.1.28 | PrimeFaces 6.2.3

nokiajavi
Posts: 61
Joined: 24 Feb 2013, 15:03
Location: España
Contact:

13 May 2019, 16:11

Same error with Primefaces 7.0.

Atribute positionType="absolute", ignore atribute position.

Is the bug registered? Thanks

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

13 May 2019, 16:45

nokiajavi wrote:
13 May 2019, 16:11

Is the bug registered?
Check the issues in github

nokiajavi
Posts: 61
Joined: 24 Feb 2013, 15:03
Location: España
Contact:

14 May 2019, 08:37

kukeltje wrote:
13 May 2019, 16:45
nokiajavi wrote:
13 May 2019, 16:11

Is the bug registered?
Check the issues in github

I have seen in github that it is registered and corrected in miletone 6.1.RC1 and as I use PF 7, it seems that the problem is still happening.
https://github.com/primefaces/primefaces/issues/2106

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests