Opened 5 years ago

Closed 3 years ago

#18252 closed defect (fixed)

[patch] dojox.gesture inner container doesn't get event, therefor links are unclickable

Reported by: numa@… Owned by: dylan
Priority: undecided Milestone: 1.8.11
Component: Dojox Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

If you have link inside a node that is tracked with dojox.gesture you will never be able to click on it. On the desktop the click event is propagated but on tablets the tap event is not propagated, therefor links won't work.

The reason is that preventDefault is called for the touch start, touchmove and touchend events. All inner block won't receive the tap/click event if you attach the swipe event to the outer block.

To correct this problem we should only call preventDefault on touchmove event. And let events bubble on touchstart and on touchend. use

        if (phase != "press" && phase != "release") {
                e.preventDefault();
            }

instead of

                e.preventDefault();   

Attachments (1)

Base.js.uncompressed.js (11.8 KB) - added by numa@… 5 years ago.
Modified version of dojox/gesture/Base.js

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by numa@…

Attachment: Base.js.uncompressed.js added

Modified version of dojox/gesture/Base.js

comment:1 Changed 5 years ago by numa@…

Sorry component should be:

dojox.gesture

instead of General

file to be changed is dojox.gesture.Base new version is attached.

comment:2 Changed 5 years ago by bill

Component: GeneralDojox
Owner: set to Adam Peller
Summary: dojox.gesture inner container doesn't get event, therefor links are unclickable[patch] dojox.gesture inner container doesn't get event, therefor links are unclickable

comment:3 Changed 3 years ago by dylan

Milestone: tbd1.11
Owner: changed from Adam Peller to dylan
Status: newassigned

comment:4 Changed 3 years ago by dylan

Milestone: 1.111.8.11

This was fixed in a different way in 1.9 via https://github.com/dojo/dojox/commit/006e1416a0f10d5885f3d57c50cf8b94a974b7e7 (by restricting by tagName), as a response to #16900.

I will look at backporting that fix to 1.8.x now.

comment:5 Changed 3 years ago by dylan

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.