This helps when the button overlaps the area where your typing. Ideally though we should make the button totally transparent when the text caret moves into the same area. However my css-foo is weak with how to fix this.
A pull request to fix up focusing of the new frame on MacOS lead me to re-factor this code so all the frame raising logic is common for the new-frame and re-use frame options. Also: * Clean up tabs * Clean up doc string
In edit-server-accept, set-buffer-multibyte is called, but it's applied to whatever buffer was previously active because the call is not wrapped with `with-current-buffer`. This makes edit-server fail if that previously active buffer is an indirect buffer (set-buffer-multibyte is illegal in an indirect buffer). Rather than add with-current-buffer, though, just remove the call altogether. It is not necessary for the process buffer to be multibyte.
This is not a fix but will make it obvious in the console log when we have hidden a text area. Unfortunately when the Blogger text area comes into focus it doesn't seem to trigger a DOM update. Maybe we should just skip adding buttons but still allow event mapping.
By using command keys which we can define we can have a definitive keystroke to active a foreground Emacs shell without messing about with failed connections to the content scripts. This is much cleaner.
Add a window.onkeydown handler to handle keypresses when no text area is in focus. This allows me to trigger the editor with a foreground message on the Chromebook.