I used to try and enter command mode when a cell looses focus. The
problem with that is that focusing an output area would remain in
edit mode.
Now, I bind this logic to the code mirror blur event, so that
focusing the output area enters command mode.
Keyboard events were previously bound to $(document), which
caused problems with our command mode not allowing other
focused elements (dialogs, etc.) to manage their own keyboard
events. We now bind to the notebook element.
This is a slightly worse user experience if it succeeds, because the new
tab flashes up before closing again, but it will let us display an
informative error page if it fails, without navigating the user away
from the interactive notebook view.
Fixing various output related things:
JavaScript output no longer requires calling container.show()
Added output_javascript CSS class that has zero height when empty.
JavaScript error messages are properly indented with the prompt area.
This was inspired by PR #4105.
* JavaScript output no longer requires calling container.show()
* Added output_javascript CSS class that has zero height when
empty.
* JavaScript error messages are properly indented with the prompt
area.
This is a reponse to the problem of having really long lines in
Markdown cells, which makes the content difficult to read. Users
want wide code cells, so we don't want to narrow everything. The
solution here is to give a prompt area to the heading/md cells
to narrow their content area slightly. The only problem is that
this makes it more difficult to distinguish between output
and md content that follows that output. The solve this, we are
adding a narrow line between output and following md.