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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 8.5.0
    • 7.0.8, 8.0.5
    • Browser Issue, Components
    • Security Level: Jimmy
    • Chrome
      ZK < 8.5.0

      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.

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

              Created:
              Updated:
              Resolved: