Use the mask component. Fixes a bug on some browsers where the mask doesn't cover the full document.
Make a better attempt at cleaning up if the return value from the plugin can't be added to the document. Previously when trying to activate a plugin after plugin had failed to save gave no indication of the problem (except in the console). Now the failed save ought to destroy the plugin context which allows subsequent plugins to re-use it.
Try not to artificially create a focused editable unless there really is no better solution. FocusTracker.restoreFocus now does nothing if there has not been a focused editable. A new function (FocusTracker.createFocus) now contains old behaviour from restoreFocus which is to focus an editable and create a range.
Most cases are better served using the new restoreFocus but trying to save the response from a plugin where the document has yet to have a focused editable uses the new createFocus behaviour in order to avoid dropping the plugin response on the floor.
Ensure that there is somewhere to insert the plugin data. This should have been committed this way initially but I forgot to revert it after testing.
Make the toolbar's plugin menu use the new menu component.
Tidy.
Fit the new popup menus back into the other parts of the app that used menus. These are the insert menu on the toolbar (a menu of plugins that are not added directly onto the toolbar) and the menu produced when the plugin close button is tapped (save/continue/exit). As part of this there were a few changes made to the popup menus. The main ones are as follows.
Where the menu is displayed now attempts to take into account the available screen estate rather than just displaying to the bottom right of the hit point.
The order of the arguments for creating menus has changed and a menu no longer needs a state function. The only mandatory arguments are now the menu definition and the callback.
Menus no longer have a close item added automatically.
Menus no longer use the menu item html's id attribute. This was a mistake as it can't be guaranteed that all menus on a page will have unique values (and so ids). A data attribute is now used instead.
Changes were made to the style menus to bring them in line with the changed menu functionality. These changes didn't affect the client supplied code for the style menus.
The html for the plugin close menu is no longer needed as the new menus are used instead.
A function for destroying menus has been added. Currently used around popups although this may not be the best solution long term.

When popped or on initial display the toolbar is now positioned at the top left hand corner. Previously it was displayed at the point of the double click which was annoying if you wanted to select text. The toolbar can still be dragged so you can reposition it manually as needed.
Closing the toolbar no longer focuses the toolbar which should mean fewer in/outs of the keyboard on mobile (although this only changes behaviour if there wasn't a selection when the toolbar was hidden).
The caret display wasn't working properly in some cases. As a result the code to calculate the visible bounds has been reworked as has the navigation code that uses it (the nav code makes a range visible).
There's now a clearer split between code that works in client coordinates and code that works in page coordinates.
There's also a fix for a bug that resulted in an exception when a mobile device was rotated when there was no text selection.
This all needs to cleaned up but it appears to work for the platforms and cases that I've tested it on so far (desktop Chrome, desktop FF, desktop Safari and Safari on iOS7). No testing done on Android as yet.