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

an errorbox doesn't pop up if it's not in the viewport when a page is loaded

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.0.8, 8.0.5
    • Fix Version/s: 8.5.0
    • Component/s: Browser Issue, Components
    • Security Level: Jimmy
    • Labels:
    • Environment:

      Chrome
      ZK < 8.5.0

      Description

      Steps to Reproduce

      1. load the zul below

      <zk>
          <div height="2000px"/>
          <textbox id="box"/>
          <button label="set error message" onClick="error()"/>
          <zscript><![CDATA[
      		public void error(){
      			box.setErrorMessage("error");
      		}
      		]]></zscript>
      </zk>
      

      2. press the button

      Current Result

      no errorbox appears.

      Expected Result

      errorbox pops up.

      Debug info

      1. 8.5.0 doesn't have such issue, fixed by https://github.com/zkoss/zk/pull/917
      2. DocRoot() returns body instead of document root.

      Root Cause

      1. if we remove the first <div>, the errorbox pops up as expected.

      Workaround

      the attached javascript.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              hawk hawk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: