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

Window Hflex="min" client side error with <script> tag

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.1
    • Fix Version/s: 7.0.2
    • Component/s: ZK Client Engine
    • Security Level: Jimmy
    • Labels:
    • Environment:

      reproduced in chrome

      Description

      this simple example causes a JS error, only if the <script> tag is the first child of the window

      <zk>
      <window border="normal" hflex="min">
          <script>console.log("hello");</script>
          <groupbox id="box" width="200px">
      	    <div id="image" />
          </groupbox>
      </window>
      </zk>
      
      Uncaught TypeError: Cannot read property 'style' of undefined zk.wpd:11744
      zjq.dimension zk.wpd:11744
      (anonymous function) zk.wpd:20218
      zFlex.fixMinFlex zk.wpd:20515
      zFlex.onFitSize zk.wpd:20507
      _reversefns zk.wpd:12568
      _fire zk.wpd:12598
      zWatch.fireDown zk.wpd:12692
      zk.override.fireDown zk.wpd:13979
      zUtl.fireSized zk.wpd:14487
      zk.Widget.zk.$extends.replaceHTML zk.wpd:16119
      mtBL0 zk.wpd:18216
      mtBL zk.wpd:18187
      doEnd zk.wpd:17797
      zk.copy.setLoaded._zkf zk.wpd:17835
      (anonymous function) zul.wnd.wpd:2268
      doEnd zk.wpd:17797
      zk.copy.setLoaded._zkf zk.wpd:17834
      (anonymous function) zul.utl.wpd:280
      doEnd zk.wpd:17797
      zk.copy.setLoaded._zkf zk.wpd:17834
      (anonymous function) zk.wpd:27075
      doEnd zk.wpd:17797
      zk.copy.setLoaded._zkf zk.wpd:17834
      (anonymous function) zk.wpd:24068
      doEnd zk.wpd:17797
      zk.copy.setLoaded._zkf zk.wpd:17834
      (anonymous function)
      

      changing the location of the <script> tag fixes the issue

      <zk>
      <window border="normal" hflex="min">
          <groupbox id="box" width="200px">
      	    <div id="image" />
          </groupbox>
          <script>console.log("hello");</script>
      </window>
      </zk>
      

        Attachments

          Activity

            People

            Assignee:
            noahhuang noahhuang
            Reporter:
            cor3000 cor3000
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: