Skip to content

ENTER submits the rename notebook dialog. #1821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 1, 2012

Conversation

ellisonbg
Copy link
Member

This address issue #1596, but I am not convinced we want this. I have bound an event handler to ENTER that will click the "OK" button when ENTER is pressed. The problem is that we cant' indicate which of the two buttons is in focus - in fact neither of them is in focus because the text area has to be in focus for the user to change the name.

We may want the original behavior, which allowed the user to navigate the focus using TAB and then press the focused button using ENTER.

@takluyver
Copy link
Member

Is there not some way of attaching the logic to the text field, so it behaves like normal HTML forms (submit on enter)?

@minrk
Copy link
Member

minrk commented May 31, 2012

Great!

I am not convinced we want this

There is simply no circumstance in which a one-field non-multiline form that doesn't submit on enter is ever okay.

@minrk
Copy link
Member

minrk commented May 31, 2012

I don't understand your qualms, what exactly is the downside of this?

@fperez
Copy link
Member

fperez commented Jun 1, 2012

Same here: on every single-line form I've ever seen, Enter is synonymous with submit. I've gotten used to the fact that I have to manually tab in IPython (and that should remain possible), but it seems to me this PR is a net gain too...

@ellisonbg
Copy link
Member Author

Let me fix one thing with this. The only problem right now is that if
a user uses TAB to focus the "Cancel" button and them hits ENTER
we will still trigger "OK". I can fix this though so it works as
expected.

On Thu, May 31, 2012 at 6:06 PM, Fernando Perez
[email protected]
wrote:

Same here: on every single-line form I've ever seen, Enter is synonymous with submit.  I've gotten used to the fact that I have to manually tab in IPython (and that should remain possible), but it seems to me this PR is a net gain too...


Reply to this email directly or view it on GitHub:
#1821 (comment)

Brian E. Granger
Cal Poly State University, San Luis Obispo
[email protected] and [email protected]

@ellisonbg
Copy link
Member Author

OK, this works exactly as expected now and I have cleaned the code up. Merging.

ellisonbg added a commit that referenced this pull request Jun 1, 2012
ENTER submits the rename notebook dialog.
@ellisonbg ellisonbg merged commit 7d8e4a4 into ipython:master Jun 1, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
ENTER submits the rename notebook dialog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants