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

support a configuration to disable touch behavior

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 9.6.0
    • 9.5.1.3
    • Components
    • Security Level: Jimmy

      User Story


      1. As an application developer, I want to enable/disable the touch behavior (e.g. meshwidget-touch.js) by the configuration, so that when I don't need touch related behaviors, I can remove them. For example, ZK detects a laptop with a touch screen and run touch related js, but users just want desktop browser behavior.

      Acceptance Criteria

      can configure this behavior with a library property

      Details

      1. org.zkoss.zkmax.tablet.ui.disabled can't disable loading touch related js
      2. this line zk.touchEnabled = !!zk.mobile || navigator.maxTouchPoints > 0; is in zk.jar/zk.wpd which is hard to override. Suggest to put js code inside a js file instead of wpd file, so that it's easier to override in the future.

      Workaround

      replace inputdevicecapabilities-polyfill.js with zk.touchEnabled = false;, replace domtouch.js and zswipe.js with empty files.

            rudyhuang rudyhuang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 3 hours Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - 3 hours Remaining Estimate - 1 hour
                3h