Automatically update karma.conf.js.
When javascript files are changed, removed or added, the build system will
update karma.conf.js.
Automatically update karma.conf.js.
When javascript files are changed, removed or added, the build system will
update karma.conf.js.
Merge pull request #370 from vandenoever/updateKarmaConf
Speed up closure compiler by about 30%.
Merge pull request #373 from vandenoever/speedup

Speed up closure compiler by about 30%.
Fix a couple of selection issues

* In FireFox if an image has no text around it, click on either side of the image resulting the same selection get returned. focusNode: image, focusOffset: 0. To workaround it, move the cursor to the next walkable position when clicking on the right side of an image.

* Another corner case is that when click on the right side of an image that has no text elements, non-FireFox browsers will retrn focusNode: frame, focusOffset: 1 as the selection. Since this is not a valid cursor position, move the cursor to the next walkable position after the frame node.
Merge pull request #294 from kevinlli/selectionFix

Fix a couple of selection issues
Allow selection of empty lists by making editinfo elements inline blocks

Elements that are simply display:inline, but have no visible content can
do strange things to the browser selections in Chrome. They will actually
stop other preceding nodes in the same container from being selectable,
instead causing the selection to climb to the parent container.

Fixes issue #30
Merge pull request #374 from peitschie/empty-list-chrome

Allow selection of empty lists by making editinfo elements inline blocks
Let the canvas's container have bouncy webkit scroll,
disable pinch-to-zoom on the editor and viewer.
Toolbar polish:

* Make the toolbar absolutely positioned and full-width.
This should let it's contents properly reflow when the
screen is not wide enough.
* Add a little shadow.
Avoid bouncing of the entire webpage when
touch-scrolling the document in iOS.
Fix body scroll issues when iOS keyboard pops up.

When, after clicking in the text, the iOS keyboard
pops up, the entire editor body is scrolled upwards
because the window is shrunk, even if there was
no way to scroll it before.
This means that the toolbar slides upwards and out
of the visible part of the viewport.

This is unacceptable, therefore this commit introduces
a fix:
CSS-translate the toolbar when detecting a scroll. focusout,
or touchmove event.
Overlay the eventTrap outside and over the cursor.

This commit pulls the event trap outside the cursor,
and makes the IME track the cursor's position and
position the trap above the cursor.

This means that there is no need to manually
blur and focus the eventManager whenever an
operation is executed.
Do not set focus in a timeout on iOS.

When attempting click-to-move, in most desktop
browsers we need to get the new selection in a
simple 0-timeout, because the window selection
is not immediately updated when handling the
mouseup event. The focus to the event trap is
set after this is ready. Otherwise, clicking
within a selection will not do anything.

Unfortunately, in iOS Safari, it is impossible
to set focus within a timeout. Therefore, this
commit takes the least painful and simplest
thing route: check navigator.platform for
iPad, iPod, and iPhone (the hope is that this
will be reliable because of Apple's consistency),
and in that case avoid computing the selection
and focus assignment within a timeout.