-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.1
-
Security Level: Jimmy
-
reproduced in chrome
-
None
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>