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

support a configuration to disable touch behavior

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: 9.5.1.3
    • Fix Version/s: 9.6.0
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  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