Opened 6 years ago
Last modified 4 years ago
#18376 new defect
Users go back a page when pressing backspace when the DateTextBox is open
Reported by: | cstephe | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.15 |
Component: | Dijit - Form | Version: | 1.9.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Users go back a page when pressing backspace when the DateTextBox? is open.
Change History (5)
comment:1 Changed 5 years ago by
Milestone: | tbd → 1.11 |
---|---|
Owner: | set to cstephe |
Status: | new → pending |
comment:2 Changed 5 years ago by
Owner: | cstephe deleted |
---|---|
Status: | pending → new |
As you suspected, when the calendar dropdown is open, the focus is on the calendar, not the <input>
. Likewise for a dropdown button with a ColorPicker?, the dropdown list of a Select, a Menu, etc.
I'm not sure how many of those backspace keys we should be preventing. Ideally I don't want to change to change the page level behavior of the backspace key just because we think the default behavior is stupid. I guess DateTextBox? is more debatable because it might seem like the focus is on the <input>
and as such, backspace should just delete a character. Although it's strange to use backspace when the dropdown is already open.
comment:3 Changed 5 years ago by
PS: the other approach would be to always leave focus on the <input>
, like what happens with TimeTextBox?, and then just forward keystrokes from the DateTextBox?'s <input>
to the Calendar popup widget.
comment:4 Changed 5 years ago by
Milestone: | 1.11 → 1.12 |
---|
comment:5 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
Worst browser idea ever to make the backspace key take you back a page.
Easiest solution is to add an event handler using dojo/on to document.body for a keypress event, and if it's the backspace key, call event.preventDefault();
Sounds like in your app the issue is a focus issue, e.g. the focus is not on the text box associated with the DateTextBox??