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

Fix enter key sending message while still composing, when using Safari on Mac. #277

Closed
wants to merge 1 commit into from

Conversation

p1atdev
Copy link

@p1atdev p1atdev commented Sep 21, 2021

Fixed #257 fix not working while using Safari on Mac.
Even though #257 is applied, Safari on Mac has the same bug as #261, as shown in the video below.

2021-09-21.21.13.57.mov

#257 fix alone will not work in Safari on Mac because of the special nature of Safari's isComposing system.

@p1atdev p1atdev changed the title Fix enter key sending message while still composing, when using Safari. Fix enter key sending message while still composing, when using Safari on Mac. Sep 21, 2021
@insertish insertish added this to To-Do in Release Tracker Sep 23, 2021
Comment on lines +192 to +197
textBox?.addEventListener("compositionstart", () => {
setComposed(false);
});
textBox?.addEventListener("compositionend", () => {
setComposed(true);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this not just use React event bindings?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried React's onCompositionStart and onCompositionEnd, but they didn't work in my environment. (There is still a bug in this event, which may be the reason.)
facebook/react#3926
So I am using addEventListener. If I could replace them with onCompositionStart/End, I think that would be better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any progress on this?

@insertish insertish moved this from To-Do to Stalled / Drafts in Release Tracker Sep 24, 2021
@insertish insertish marked this pull request as draft October 9, 2021 21:22
@insertish
Copy link
Member

Closing due to rewrite, marking as potential issue in future by linking to revoltchat/frontend#64.

@insertish insertish closed this Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release Tracker
Stalled / Drafts
Development

Successfully merging this pull request may close these issues.

None yet

3 participants