Fix firefox-specific bugs in gorilla-editor. Tests pass now