HabitRPG / habitica-chat-extension

A habitica.com Chat Client for Chrome
18 stars 13 forks source link

Ctrl-Enter no longer sends message #63

Closed cTheDragons closed 4 years ago

cTheDragons commented 4 years ago

Unable to send a message using Ctrl-Enter. This is an issue for both Chrome and Firefox versions.

(Tested on Chromium Version 83.0.4099.0 and Firefox Version 77.0.1)

Possible related to issue #55 that was recently closed.

paglias commented 4 years ago

Hmm sorry about that, @CraigInches could you give this a look? otherwise we can revert the new version

CraigInches commented 4 years ago

NP, I will take a look.

CraigInches commented 4 years ago

@cTheDragons and @paglias looks like the functionality was removed prior to my fixes: https://github.com/HabitRPG/habitica-chat-extension/commit/b24a1e5ab48230ae37bdced029a6a0f0c89be072#diff-4ead8d4c5d2db28c0921aa02c4284738L204 and https://github.com/HabitRPG/habitica-chat-extension/commit/b24a1e5ab48230ae37bdced029a6a0f0c89be072#diff-3e1cc66decf524e05c9a4d14924652c4L204

juanj commented 4 years ago

Hey I would like to work on this issue.

@CraigInches you are right. Looks like this functionality was explicitly removed. Any ideas on why this was done? Looking at the commit you linked one can see that the implementation for chrome was incomplete. My assumption will be that because it was not working for chrome it was removed for both.

Adding the code that was removed works perfectly on Firefox, now I need to check if it works on chrome or some changes need to be done.

@cTheDragons the removed code linked by @CraigInches sends the message when the Enter key is pressed alone and inserts a new line when is pressed in combination with Shift. This was the old behavior, but is the wanted behavior? Or will be better to use Ctrl + Enter to send and Enter alone to add new line?

cTheDragons commented 4 years ago

@juanj It should match the Habitica's website which is Ctrl + Enter to send a message. Shit + Enter and Enter just give a new line.

BTW Are you aware of the challenge posted in Comrades regarding this?

juanj commented 4 years ago

@cTheDragons Ok. I just saw the other issue where you mentioned that it was changed to Ctrl + Enter to prevent the bug.

I'm aware of the challenge, moreover that how I found about this issues 😄

Also, it looks like the pull request #51 was intended to fix this. @benjaminbhollon Are you still working on redoing this pull request?

benjaminbhollon commented 4 years ago

No, sorry. I've been taking a break from code. I informed cTheDragons but forgot to inform all of y'all. Sorry about that!