adding Barcodescanner twice causes javascript errors

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Critical
    • 10.2.0
    • Affects Version/s: 9.6.2
    • Component/s: None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      1. click "add" button, wait the camera to start showing the video around 3 seconds
      2. Click "remove" button
      3. click "add" button

      Current Result

      The barscanner widget keeps producing the error:

      zkmax.barscanner.wpd:13600 Uncaught TypeError: Cannot read properties of undefined (reading 'getContext')
      at Object.callback (zkmax.barscanner.wpd:13600:40)
      at n (zkmax.barscanner.wpd:1991:19)
      at zkmax.barscanner.wpd:2018:13
      at Array.forEach (<anonymous>)
      at Object.publish (zkmax.barscanner.wpd:2017:29)
      at v (zkmax.barscanner.wpd:1633:59)
      at n.worker.onmessage (zkmax.barscanner.wpd:1680:102)

      Expected Result

      no error

      Workaround

      Similar to the workaround in ZK-4338
      zk-5230.js

        1. zk-5230.zul
          8 kB
        2. zk-5230.js
          7 kB

            Assignee:
            DevChu
            Reporter:
            hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: