Opened 6 years ago

Closed 3 years ago

Last modified 3 years ago

#16900 closed defect (fixed)

[patch][ccla]dojox/gesture breaks the editing of input fields

Reported by: Adrian Vasiliu Owned by: Evan
Priority: undecided Milestone: 1.9
Component: Dojox Version: 1.9.0a2
Keywords: Cc:
Blocked By: Blocking:

Description

dojox/gesture breaks the editing of <input> (or <textarea>) elements that are descendants of elements for which dojox/gesture is used.

How to reproduce:

  1. Load the attached test_gesture_with_input_field.html (this is the same as dojox/gesture/tests/test_gesture.html except that it contains an <input> field).
  1. Try to edit the content of the input field (click or touch the input field).

=> You cannot.

This holds in both desktop (latest FF or Chrome) and mobile browsers (Safari on iPad 4). A workaround is (on desktop) to give the focus to the input field using the TAB key.

The cause is the e.preventDefault() called by dojox/gesture/Base._process() regardless of the type of event's target. The attached suggested patch goes similarly as dojo/touch for the same issue.

Attachments (2)

test_gesture_with_input_field.html (3.0 KB) - added by Adrian Vasiliu 6 years ago.
Test case to reproduce that issue.
patch16900.patch (746 bytes) - added by Adrian Vasiliu 6 years ago.
Avoid breaking the editing of input fields - Adrian Vasiliu (IBM, CCLA)

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by Adrian Vasiliu

Test case to reproduce that issue.

Changed 6 years ago by Adrian Vasiliu

Attachment: patch16900.patch added

Avoid breaking the editing of input fields - Adrian Vasiliu (IBM, CCLA)

comment:2 Changed 6 years ago by Adam Peller

Owner: changed from Adam Peller to Evan
Status: newassigned
Summary: dojox/gesture breaks the editing of input fields[patch][ccla]dojox/gesture breaks the editing of input fields

comment:3 Changed 6 years ago by Adrian Vasiliu

Related ticket: #16676, which is also about the impact of this preventDefault(). Note that http://trac.dojotoolkit.org/attachment/ticket/16676/gesture_click.patch does not fix the issue reported in the present ticket, while the issue is still fixed by applying both patches (no conflict).

comment:4 Changed 6 years ago by Adrian Vasiliu

In [31224]:

fixes #16900. Fix in gesture/Base to avoid breaking the editing of input fields, and addition to test app. !strict

comment:5 Changed 6 years ago by Adrian Vasiliu

(Committed after getting green light from Evan who wrote me "The fix looks safe and reasonable, please feel free to commit after you tested.". Testing: found no regression due to this change).

comment:6 Changed 6 years ago by Adrian Vasiliu

Further change committed with log containing wrong id in "refs", sorry. See [31238].

comment:7 Changed 3 years ago by dylan

Milestone: tbd1.9
Resolution: fixed
Status: assignedclosed

Looks like this was fixed 3 years ago. Closing it out.

comment:8 Changed 3 years ago by dylans <dylan@…>

In f06c6ec25d660a100ced11798863b62dd32e42ba/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.