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

Code cell missing highlight on load #3636

Closed
ellisonbg opened this issue Jul 15, 2013 · 11 comments · Fixed by #3911
Closed

Code cell missing highlight on load #3636

ellisonbg opened this issue Jul 15, 2013 · 11 comments · Fixed by #3911
Assignees
Milestone

Comments

@ellisonbg
Copy link
Member

Sometimes on load, cells can lack highlighting.

Update: Keeping old description about refresh below

The CodeMirror object has a refresh method that must be called in certain cases. This method must be called at very particular points or the CM editor starts to misbehave. Getting this right was one of the most difficult parts of making the notebook work. In the last week or so there have been changes in master (I wasn't running master until last night) that are causing refresh related problems:

  • Sometimes the CM editor cell won't have the right vertical height until you click on a cell.
  • When a notebook is first opened, the CM areas won't be properly syntax highlighted.
@minrk
Copy link
Member

minrk commented Jul 15, 2013

I haven't seen either of those effects, can you be more specific about reproducing the bad behavior?

I can't think of any focus-related changes in the past several weeks.

@ellisonbg
Copy link
Member Author

Hmm, let me play with it a bit and see what I can come up with.

@fdeheeger
Copy link

I get such bug this morning (running the master). Here is some snapshots that shows this effect :

When you load the nb, you see that:
slection_050

When you click on the cell, it shows colors:
slection_051

@minrk
Copy link
Member

minrk commented Jul 16, 2013

Can you share the notebook (and browser info)? I can't seem to reproduce it here.

@ellisonbg
Copy link
Member Author

I leave for my trip in a few minutes, so I probably won't get to this until
after I get to my destination.

On Tue, Jul 16, 2013 at 12:04 PM, Min RK notifications@github.com wrote:

Can you share the notebook (and browser info)? I can't seem to reproduce
it here.


Reply to this email directly or view it on GitHubhttps://github.com//issues/3636#issuecomment-21065407
.

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

@fdeheeger
Copy link

It seems to be browser dependent. I do not have that bug with firefox (v22), but have it with chromium:
Version 28.0.1500.52 Ubuntu 12.04 (28.0.1500.52-0ubuntu1.12.04.2)

Super simple notebook:
https://gist.github.com/fdeheeger/6021564

@minrk
Copy link
Member

minrk commented Jul 17, 2013

Doesn't seem to affect Chrome 30 or Firefox 22 on OS X.

@ivanov
Copy link
Member

ivanov commented Jul 17, 2013

does not affect Chrome 28.0.1500.72 m on Windows

@Carreau
Copy link
Member

Carreau commented Jul 19, 2013

And suddenly I have it on chrome 29, whereas I've tried many time to reproduce it ... :-(

@Carreau
Copy link
Member

Carreau commented Jul 19, 2013

And a call to refresh manually on faulty CM does not fix the problem. It might be due to ipython mode beeing defined in the background, so not defined yet when CM try to highlight hence it falls back to null-mode that does nothing.

@Carreau
Copy link
Member

Carreau commented Jul 19, 2013

This also never triggers when my web-inspector is open and I reload. I have close the web-inspector (race condition somewhere?)

@ghost ghost assigned ellisonbg Jul 27, 2013
minrk added a commit to minrk/ipython that referenced this issue Aug 5, 2013
ensures IPython mode gets defined at startup,
which can sometimes fail because the Python mode was loaded dynamically.

closes ipython#3636
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
ensures IPython mode gets defined at startup,
which can sometimes fail because the Python mode was loaded dynamically.

closes ipython#3636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants