Briskine / briskine

Write faster with templates and keyboard shortcuts.
https://www.briskine.com/
GNU General Public License v3.0
108 stars 23 forks source link

Only shortcuts when sending #207

Closed jebarjonet closed 7 years ago

jebarjonet commented 8 years ago

Use case :

I am having problems with some templates:

When I use the template via the shortcut, it shows the right template content, then I send the emails or note, and only the shortcut is appearing !

EXEMPLE: shorcut= "call" template content= "you can call me at ...."

I use the shorcut + tab, then the content is appearing, and when I send it, it is written "call" instead.

I think we should triggered a change event on the textarea in order to update it without needing the user to enter letters then removing it to force the textarea to update.

Something like element.onchange(); with the textarea as element may do the trick ?

xarg commented 8 years ago

It's a very very hard problem to solve. I doubt that it will ever be easy to fix. The reason is that on WYSIWG editors like draf.js have their own internal state that uses contenteditable only as a element, the state of the editor is abstracted and all those callbacks will not work, manually triggering stuff from the extension which is another browser execution context will not work either.

Content scripts (which is the only thing we can use) are sandboxed and will not allow user created events which is usually what these editors look for.

On Fri, Sep 16, 2016 at 11:27 AM, Jean-Elie Barjonet < notifications@github.com> wrote:

Use case :

I am having problems with some templates:

When I use the template via the shortcut, it shows the right template content, then I send the emails or note, and only the shortcut is appearing !

EXEMPLE: shorcut= "call" template content= "you can call me at ...."

I use the shorcut + tab, then the content is appearing, and when I send it, it is written "call" instead.

I think we should triggered a change event on the textarea in order to update it without needing the user to enter letters then removing it to force the textarea to update.

Something like element.onchange(); with the textarea as element could probably do the trick

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gorgias/gorgias-chrome/issues/207, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFyASaRMRswVfMNYRBkDVoRfDOwBAylks5qqmETgaJpZM4J-v2p .

Alex Plugaru Write e-mails faster with Gorgias (Techstars '15) https://gorgias.io/