Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5187

Window setPosition() does not combine parameters corretly when used with parent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 9.6.2
    • Fix Version/s: None
    • Component/s: Components
    • Labels:
      None

      Description

      Steps to Reproduce

       

      According to the javadoc of Window it is possible to specify the position of the Window based on a combination of values e.g. "left,center'.

      https://www.zkoss.org/javadoc/8.0.0/zk/org/zkoss/zul/Window.html#setPosition(java.lang.String)

      However it is impossible to define the position inside the parent element.

      As you can try in the fiddle (https://zkfiddle.org/sample/3phlhus/2-Center-Window-in-Parent#source-2) you can either specify "parent" which places the window in the top left corner of the parent element or "center" which places it in the middle. But the combination to center it inside the parent component does not work "parent,center".

       

      Window win = new Window();
      win.setTitle("Should be centered in parent");
      win.setParent(container);
      win.setPosition("parent,center");
      win.doPopup();

       

      Current Result

      The combination "parent,center" to center it inside the parent component does not work.

      Expected Result

      Window component should be correctly centered inside the parent component.

      Debug Information

       

      Workaround

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            christian christian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: