Skip to content
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

Ampersands can't be typed sometimes in notebook cells #1425

Closed
fperez opened this issue Feb 21, 2012 · 4 comments
Closed

Ampersands can't be typed sometimes in notebook cells #1425

fperez opened this issue Feb 21, 2012 · 4 comments
Milestone

Comments

@fperez
Copy link
Member

fperez commented Feb 21, 2012

As reported on this thread, sometimes ampersands in text cells can't be input. @ellisonbg can now reproduce it, this issue is filed here just so we don't lose track of it solely on an email thread.

@cschin
Copy link

cschin commented Feb 28, 2012

This should fix the reluctant Ampersands problem.

diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js
index 2e6e389..2f0d6f8 100644
--- a/IPython/frontend/html/notebook/static/js/codecell.js
+++ b/IPython/frontend/html/notebook/static/js/codecell.js
@@ -94,7 +94,7 @@ var IPython = (function (IPython) {
             var cursor = editor.getCursor();
             var pre_cursor = editor.getRange({line:cursor.line,ch:0},cursor).trim()+'(';
             that.request_tooltip_after_time(pre_cursor,tooltip_wait_time);
-        } else if (event.which === 38) {
+        } else if (event.which === 38 && event.type === 'keydown') {
             // If we are not at the top, let CM handle the up arrow and
             // prevent the global keydown handler from handling it.
             if (!that.at_top()) {

@piti118
Copy link
Contributor

piti118 commented Apr 5, 2012

I can confirm this issue as well at least on Chrome OSX.

@cschin
Copy link

cschin commented Jul 7, 2012

I see "event.type === 'keydown'" is already in the 0.13 release. I think this issue can be closed.

@fperez
Copy link
Member Author

fperez commented Jul 7, 2012

Great, thanks @cschin. closing.

@fperez fperez closed this as completed Jul 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants