Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#17874 closed defect (fixed)

dojox/mobile/ComboBox doesn't close if no selection made on iOS

Reported by: George Sexton Owned by: Adrian Vasiliu
Priority: undecided Milestone: 1.10
Component: DojoX Mobile Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:

Description

Description:

Given the sample code below, when using an iPhone 5s running the current iOS, if you enter the combo box, a list of selections appear. However, if you exit the field, the list is not hidden, obscuring the form.

Example Code:

<label for=IDLocationName>Location</label><br>

<select id="IDlocation_list" name="location_list" data-dojo-props="id: 'locationList'" data-dojo-type="dijit/form/DataList" > <option value="238">16th Street Mall ... <option value="161">Zen Center of Denver </select> <input onchange="locationUpdateHandler(document.frmEditItem.location_name.value);" name="location_name" placeholder="Select or Enter Location" style="width: 85%; margin-left: 5%;" type="text" data-dojo-type="dojox/mobile/ComboBox" data-dojo-props='list:"locationList", queryExpr: "*${0}*",autoComplete: false' >

Observed Behavior

On exiting the input device, the list of items is not hidden, obscuring other fields on the form.

Expected Behavior

On leaving the ComboBox?, the list should be hidden if no selection is made.

Additional

This error happens with iOS 5 as well. It does not happen with Firefox on Linux running the same page.

Change History (8)

comment:1 Changed 6 years ago by Adrian Vasiliu

Remarks:

  • I guess that by "exiting the input device" you mean for instance taping anywhere outside the dropdown of the combobox. Right?
  • I agree the behavior isn't optimal.
  • The behavior with this respect is unchanged since 1.8.0. No recent regression here, as far as I can see.
  • It seems a consequence of this old commit: https://github.com/dojo/dojox/commit/921b653a723e4f3d25a3a3ad8bd94bdbfc765fbc - in particular the replacement of closing the dropdown on touch devices using "ontouchend" with closing using "onmouseup".
  • Listening instead to click events seems to do the trick but of course much more testing would be required before going for a change.
  • Note however that dojox/mobile/ComboBox is marked as an experimental widget.

comment:2 Changed 6 years ago by Adrian Vasiliu

Owner: set to Adrian Vasiliu
Status: newassigned

comment:3 Changed 6 years ago by George Sexton

I guess that by "exiting the input device" you mean for instance taping anywhere outside the dropdown of the combobox. Right?

Tapping outside, or when the IOS keyboard is visible, using the next field or previous field arrow icons to navigate to the next input field.

Note however that dojox/mobile/ComboBox is marked as an experimental widget.

I'm OK that its not perfect, but leaving the div up on the screen, makes it pretty useless.

comment:4 Changed 6 years ago by Adrian Vasiliu

I understand your point of view. Some remarks though:

  • While it's indeed annoying that the popup doesn't go away by touching anywhere outside it, the user does have a way to close it without changing the currently selected option: by selecting (touching) it in the dropdown.
  • The experimental status implies that the widget can even be removed in a future release, and that its use is discouraged for a production software.
  • That said, we might fix this issue. I just mentioned its experimental status as a piece of information.

comment:5 Changed 5 years ago by Adrian Vasiliu <vasiliu@…>

Resolution: fixed
Status: assignedclosed

In dc89ab0841af159ae9c095e4a0d36ef34f12697e/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 5 years ago by Adrian Vasiliu

Remarks concerning the fix:

  • Fixed by a partial revert of https://github.com/dojo/dojox/commit/921b653a723e4f3d25a3a3ad8bd94bdbfc765fbc .
  • The log of this old commit refers to migration to dojo/touch, however it strangely replaced the closing of the dropdown on ontouchend by closing on onmouseup.
  • I've tested that after this fix there is no regression wrt. the misbehavior described in the ticket corresponding to the old change (#14893).
  • I've tested that this change fixes the issue from the present ticket on iOS 5.x, 6.x, and 7.x.
Version 0, edited 5 years ago by Adrian Vasiliu (next)

comment:7 Changed 5 years ago by Adrian Vasiliu <vasiliu@…>

In 868306695a8ac0736bca1b8bb496688e0446ff96/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:8 Changed 5 years ago by Adrian Vasiliu

Milestone: tbd1.10
Note: See TracTickets for help on using tickets.