without this, it is not possible to select any text using the mouse in
the contents of the modal. For example: editing the notebook metadata
JSON you end up just moving the whole box around instead of being able
to select a portion of the JSON using the mouse.
- Cookie-authenticated API requests must use set X-XSRFToken header
- add utils.ajax for making ajax requests, adding xsrf header from default location
See https://bugs.jquery.com/ticket/9841. In our case, the OutputArea was triggering a ‘resize’ event on its element, which was bubbling up and causing this handler to execute every time an output was appended. This was a pretty big drain on output areas that quickly changed (like for interact widgets), presumably since this function involves a DOM read to get heights.
The only real fix is an errant `+` on the final replacement, which would end up skipping sequential replacements.
- leaves trailing `\r` on the text, if there is one
- use groups to avoid unnecessary replace calls (no change)
- includes test
rather than throwing handler errors in the call to `.trigger()`
Extensions can register buggy event handlers.
These should not be able to cause failures in the event-triggering code paths.
This should fix several avenues where extensions (or other bugs) could prevent a notebook from loading.
These are like carriage return, but only affect a character before them
instead of the whole line. I've checked that this makes the output from
'man ls' look OK.
Closes gh-1572
1) finish the step allowing the use of es6
- this include some tweak to web pack configuration to speed up
recompile in watch mode (in particular cache sourcemaps).
- enable eslint (error only), on obvious mistakes.
- setup babel to compile to es5 as a target.
2) Make the test pass under Casper that does not always have
`Function.prototype.bind` defined, which we cannot patch only in the
tests.
3) Write an actual shortcut editor that list and allow to modify most of
the command mode shortcut.
The logic to persist the shortcuts is a bit tricky as there are default
keyboard shortcuts, and so when you "unbind" them you need to re-unbind
them at next startup. This does not work for a few shortcut for
technical reasons: `<Esc>`, `<Shift>`, as well as `<Ctrl-Shift-P>` and `<F>`
which register asynchronously, so are not detected as "default"
shortcuts.