stsquad / emacs_chrome

A Chromium/Firefox "clone" of It's All Text for spawning an editor to edit text areas in browsers. Based on David Hilley's original Chromium extension.
https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh
GNU General Public License v3.0
514 stars 91 forks source link

Context menu doesn't work in Chrome #158

Open twlz0ne opened 5 years ago

twlz0ne commented 5 years ago

There is nothing happened when I click the context menu item Edit with Emacs in Chrome. After debugging the source code, I found that the tab_port.sender is read-only:

edit-wit-emacs-context-menu-doesnt-work-in-chrome


stsquad commented 5 years ago

I wonder if Google have changed the tab port API?

stsquad commented 5 years ago

Well I can re-create the problem on Linux with Chrome 72 so I suspect this is a change to the API. Looks like this was last touched in bug #85 but I'll have to do some digging. If you feel upto it you are welcome to have a look yourself.

twlz0ne commented 5 years ago

I think Google made this change just to prevent sender from being modified. So, there is no reason to use it anymore.

stsquad commented 5 years ago

OK this is weird - it works on my desktop machine...

stsquad commented 5 years ago

sigh

Works with Chromium Version 72.0.3626.121 (Developer Build) (64-bit) Fails with Google Chrome Version 73.0.3683.67 (Official Build) beta (64-bit)

stsquad commented 5 years ago

@twlz0ne ok I think I've removed the need for tab_port.sender. Can you test the latest master and I'll make a release.

twlz0ne commented 5 years ago

Msg id undefined when I return to the browser after finishing editing:

emacs-chrome-msg-id-undefined

Then there is nothing appears in the textarea.

stsquad commented 5 years ago

Hmm I'm confused as to what is going wrong then.... and chance you could enable the logging messages and capture them for the whole edit sequence?