1

The text input field appears to support the Ctrl+Z (undo) fully.

The number and date input field only supports it, if the value has been typed into the field in question. If, however, it was selected by means of the associated helper control (i.e. the range control for the number fields and the calendar control for the date fields), then Ctrl+Z does not work.

Can anyone advice how to make the number and date fields support Ctrl+Z no matter how the value is entered by the user?

Thanks.

P.S.

I am currently using jquery and chrome.

EDIT1

I am using <input type='number' ... and <input type='date' ... It is entirely possible that I should use something else (what?)

EDIT2

I am talking about interactive actions only, not script based changes.

7
  • 1
    Please post some code. Are you using HTML5 <input type=number> etc. or jQuery tools (which?) for input or both? Commented Aug 21, 2012 at 11:34
  • Added the missing information. Commented Aug 21, 2012 at 11:36
  • 1
    Personally I'm not sure this is a great move. Firstly it's unprecedented; I cannot think of any other non-typing action a user can do in a browser that can be undone with CTRL+Z (e.g. selection from dropdowns, which your case is similar to). Secondly it would override (or conflict with) in-built browser functionality. In Opera, for example, CTRL+Z, when pressed outside of a text field, re-opens the last-closed tab. Commented Aug 21, 2012 at 11:43
  • It is kinda inconsistent, that if I type in a number field, then I can undo it, but if I select from the range control - then I do not. Don't you think so? Commented Aug 21, 2012 at 11:44
  • I see where you're coming from, but the convention - at least in a browser - is that CTRL+Z is for what has been typed, not what has been invoked by other means. As such, you could also argue that your userbase will not be expecting (or therefore using) such functionality should you provide it. Commented Aug 21, 2012 at 11:45

1 Answer 1

1

Undo is a weak spot in HTML5 applications. There is no simple solution because undo is ultimately application dependent (just like in desktop apps).

See this question for some solutions: Implementing undo in a web app

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.