Hi Yip Ng,
I'm sorry for the confusion.
I will explain my requirement.
I use popups similar to following markup (same as I mentioned above)
<ice:panelPopup id="modalPnlPop"
draggable="true" modal="true"
positionOnLoadOnly="true"
visible="#
{popup.modalRendered}"
rendered="#{popup.modalRendered}
"
autoCentre="true"
clientOnly="false"
styleClass="corePopup">
Here I expect the popup to be auto centered only load. It must also be centered within the view port, not relative to the whole page.
For example in the component showcase, if I click on "Show" button, then the popup should be displayed and it should position itself to the center of the view port. Then if I scroll the page, I don't want the popup to change its position. This is what I expect from positionOnLoadOnly attribute.
My initial problem was that the popup positioning is not smooth when scrolling. Therefore I wanted to center the popup only on load and it will not change the position when page is scrolled or window is resized. That's why I used positionOnLoadOnly attribute.
I hope you understood what I'm trying to say.
Documentation for positionOnLoadOnly attribute says: "Centre or position popup once on load only. Any drag and drop will disable autoCentre and autoPosition."
Your change fixed what positionOnLoadOnly attribute should be doing according to the documentation.
But I think currently my requirement cannot be acheived with above markup.
Hi Ken,
Thanks for the reply..
So, that's again the expected behavior. For me it was unexpected.
I thought closing popup should reset the earlier dragged state.
Anyway, thanks for letting me know. I think what I need to reset is the dragged state. I will see.
I hope I the next release is ready now!
Thanks.
Isuru.