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

require.js causes Toast.show() failed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.6.3
    • 9.6.1
    • None
    • Security Level: Jimmy

      Steps to Reproduce

          <script src="require.js"/>
          <button onClick='org.zkoss.zkmax.ui.util.Toast.show("now is " + System.currentTimeMillis())'/>
      

      1. click the button

      Current Result

      no toast message showed

      zkmax.wgt.wpd:4073 ReferenceError: SignaturePad is not defined
      at zkmax.wgt.wpd:2819:26
      at doEnd (zk.wpd:28136:7)
      at Function._zkf (zk.wpd:28187:9)
      at zk.fmt.wpd:618:48
      at doEnd (zk.wpd:28136:7)
      at Function._zkf (zk.wpd:28187:9)
      at zk.fmt.wpd:618:74
      (anonymous) @ zkmax.wgt.wpd:4073
      doEnd @ zk.wpd:28136
      _zkf @ zk.wpd:28187
      (anonymous) @ zk.fmt.wpd:618
      doEnd @ zk.wpd:28136
      _zkf @ zk.wpd:28187
      (anonymous) @ zk.fmt.wpd:618
      zk.wpd:50894 Uncaught TypeError: Cannot read properties of undefined (reading 'show')
      at zk.wpd:50894:19
      at doEnd (zk.wpd:28136:7)
      at Function._zkf (zk.wpd:28187:9)
      at zkmax.wgt.wpd:4073:48
      at doEnd (zk.wpd:28136:7)
      at Function._zkf (zk.wpd:28187:9)
      at zk.fmt.wpd:618:48
      at doEnd (zk.wpd:28136:7)
      at Function._zkf (zk.wpd:28187:9)

      Expected Result

      show a toast message

      Debug Information

      • a customer use a 3rd party library that has define function from require.js

      Workaround

      zk.load('zkmax.wgt', null); first

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

              Created:
              Updated:
              Resolved: