Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMail stopped working: because it doesn't use a textarea? #162

Open
attila-lendvai opened this issue Sep 18, 2019 · 8 comments
Open

GMail stopped working: because it doesn't use a textarea? #162

attila-lendvai opened this issue Sep 18, 2019 · 8 comments

Comments

@attila-lendvai
Copy link
Contributor

Chromium on Debian: Version 76.0.3809.100 (Developer Build) built on Debian 10.0, running on Debian 10.1 (64-bit)

running the latest from the git repo, both in the browser and in Emacs 26.1.

commit af46de40e2991b046f04856c18a6483badce38aa (HEAD -> master, origin/master, origin/HEAD)
Author: Alex Bennée <[email protected]>
Date:   Sat Mar 16 16:44:27 2019 +0000

    xmlcomms.js: actually honour the edit_server_host setting

it has stopped working in the gmail compose window, somewhere around when i updated debian (and with that i guess chromium, too). the behavior is strange: as if emacs received the contents of past invocations... and/or then the content is further html-escaped with each invocation...? but it's never showing the gmail compose contents, and sometimes it's just empty.

after investigating i noticed that gmail is not using textarea's, but then the context menu contains the edit-with-emacs button when i click there, so i guess there's already some magic in the code to deal with gmail specifically?

another strange thing that Alt+Enter (my shortcut if it's not the default) doesn't work in gmail's compose window, but it works in github textboxes.

@stsquad
Copy link
Owner

stsquad commented Sep 18, 2019 via email

@stsquad
Copy link
Owner

stsquad commented Sep 18, 2019

FWIW my Google Chrome is 77.0.3865.75 (Official Build) (64-bit)

@attila-lendvai
Copy link
Contributor Author

i have tried in both plain text and rich text modes.

errr... wait!

i have reloaded the gmail tab just now (by entering "gmail.com" into the location bar), and now ALT+Enter started to work properly. but when i issue the context menu command, then i get this into the emacs buffer:

<pre>&lt;pre&gt;&amp;lt;pre&amp;gt;&amp;amp;lt;pre&amp;amp;gt;asdfasdfasdf&amp;amp;lt;/pre&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;/pre&gt;</pre>

@stsquad
Copy link
Owner

stsquad commented Sep 18, 2019

That certainly looks like a non-text only mode bunch of html.

@attila-lendvai
Copy link
Contributor Author

i also have edit-server-htmlize installed from git. i tried without, and it just got worse (ALT+Enter also contained html tags, not only when selecting from the menu).

this is how i load stuff in emacs:

(add-to-list 'load-path (expand-file-name (concat dwim-emacs-workspace "/emacs_chrome/servers")))
(require 'edit-server)
(edit-server-start)

;; to deal with the stupid new gmail compose code that uses html internally even in plain text mode
(add-to-list 'load-path (expand-file-name (concat dwim-emacs-workspace "/edit-server-htmlize")))
(autoload 'edit-server-maybe-dehtmlize-buffer "edit-server-htmlize" "edit-server-htmlize" t)
(autoload 'edit-server-maybe-htmlize-buffer   "edit-server-htmlize" "edit-server-htmlize" t)
(add-hook 'edit-server-start-hook 'edit-server-maybe-dehtmlize-buffer)
(add-hook 'edit-server-done-hook  'edit-server-maybe-htmlize-buffer)

;; KLUDGE ideally the above installed autoloads should be enough, but
;; we cannot install the local load path early enough for
;; customizations, so we cannot use customization for setting
;; EDIT-SERVER-HTMLIZE-URL-REGEXP.
(require 'edit-server-htmlize)
(setq edit-server-htmlize-url-regexp
      "^\\(mail\\.google\\.com/mail/\\|groups\\.google\\.com/forum/\\)")

@SmartLayer
Copy link

SmartLayer commented Jun 11, 2020

I can prove that the plugin can't find the textarea to focus in in Gmail even when Gmail has the "Simple Text" mode, with the following screen recording on Firefox (not Chrome but I think it shows the same problem)

Captura del escritorio de 11-06-20 18:18:32.webm.gz

@parhamdoustdar
Copy link

I have also set GMail to just text instead of the rich editor, but pressing alt+enter doesn't work.

@stsquad
Copy link
Owner

stsquad commented Dec 23, 2020

The latest push to master fixed a problem with gmail switching to having "spellcheck=false" attributes in the editable div. If you could try the current master and confirm if it solves your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants