0

When scroll on page and open dialog with IE or Chrome, calendar popup remain below from calendar input. i called PF(widgetVar).alignPanel(); function on a lot of ajax events(onfocus, onselect ...) but only onclick event works. but if user use tab (not with click event), it isnt work. on EI or Chrome, when i click calendar input, popup remain below but if i resize window, popup appears right position. (firefox works perfectly)

i use pf 7.0, tomcat 8.5, jsf 2.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html">
    <h:head></h:head>

    <h:body>
        <p:spacer height="2000" />
        <p:commandButton value="Open Dialog" type="button" onclick="PF('dlg').show();" />

        <p:dialog widgetVar="dlg">
            <p:calendar />
        </p:dialog>

    </h:body>
</f:view>
</html>

i hope it is ok.

enter image description here

ismailoglu
  • 71
  • 1
  • 8
  • Can you check https://stackoverflow.com/questions/26228872/pselectonemenu-dropdown-part-scrolls-and-does-not-stay-in-position? – Kukeltje Apr 07 '20 at 10:43
  • primefaces dialogs default position value is "fixed" and my all dialogs appends to body. – ismailoglu Apr 07 '20 at 10:51
  • There is way more in there then the dialog default position and it is not specifically related to the appendTo of the dialog but the select (so might apply to the calendar too) – Kukeltje Apr 07 '20 at 10:57
  • i tried to set position "absolute" for dialog, calendar works correctly but this time dialog stay same position when i scroll on page. – ismailoglu Apr 07 '20 at 11:07
  • read about changing things on the select (and try to do the same on the calendar) **that** is the main thing about the other questio... The appendTo part, like stated on the previous comment. Try to NOT focus that much on the dialog – Kukeltje Apr 07 '20 at 11:10
  • i called PrimeFaces.widget.Calendar.prototype.alignPanel function on calendar beforeShow event but it didnt work. i override _showDatePicker event of jQuery but didnt work. – ismailoglu Apr 09 '20 at 09:34
  • Since you have no [mcve], it is impossible to see why it does not work for you... So please create one... asap... – Kukeltje Apr 09 '20 at 11:30
  • And did you try PF p:calendar as an alternative? – Kukeltje Apr 09 '20 at 11:31
  • Please edit your question and add the code there. Formatted and in [mcve] flavour. – Kukeltje Apr 09 '20 at 13:30

0 Answers0