Input fields don't work in dialogs #1243

Closed
peterflynn opened this Issue Jul 12, 2012 · 4 comments

Projects

None yet

1 participant

@peterflynn
Member
  1. Run this code somewhere in Brackets: Dialogs.showModalDialog(Dialogs.DIALOG_ID_ERROR, "Test", "<input type='text' />");
  2. Try to type in the input field that appears in the dialog

Result: Field gets focused, but keystrokes do nothing

There's code in Dialogs._handleKeyDown() that attempts to let input elements work, but it looks wrong. Instead of this.filter(":input") it should probably be something like $(e.target).filter(":input").

@peterflynn peterflynn was assigned Jul 12, 2012
@peterflynn
Member

Confirmed fixed as part of pull request review

@peterflynn peterflynn closed this Aug 1, 2012
@peterflynn
Member

Tagging Sprint 12 so we remember when it was fixed

@peterflynn
Member

Reopening -- I just discovered that key handling still prevents you from putting useful text fields in dialogs, since some keys are interpreted as dialog-closing shortcuts. For example, in the text dialog above try typing the letter "n" on Windows...

@peterflynn peterflynn reopened this Sep 27, 2012
@peterflynn peterflynn added a commit that referenced this issue Sep 27, 2012
@peterflynn peterflynn Fix bug #1243 (Input fields don't work in dialogs). Improves on an ea…
…rlier

fix that let keystrokes through to the textfield, but auto-closed the
dialog when certain chars were typed. Now we only close the dialog if the
char typed could not have been intended as text input.
811d18e
@peterflynn
Member

Updated fix has been merged -- closing

@peterflynn peterflynn closed this Sep 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment