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

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

Comments

Projects
None yet
3 participants
Owner

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 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()) {
Contributor

piti118 commented Apr 5, 2012

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

cschin commented Jul 7, 2012

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

Owner

fperez commented Jul 7, 2012

Great, thanks @cschin. closing.

@fperez fperez closed this Jul 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment