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

InputEvent fired twice when inserted emoji #136

Open
erman999 opened this issue May 23, 2022 · 5 comments
Open

InputEvent fired twice when inserted emoji #136

erman999 opened this issue May 23, 2022 · 5 comments

Comments

@erman999
Copy link

When standard characters inserted there is no problem it behaves as it should be. However, while inserting emojis event fires twice. I realised that inserted data length returns 2 when inserted emoji.

Untitled

To open emoji menu on Windows 11 use Win + .

@luisspassos
Copy link

luisspassos commented Aug 14, 2022

I prevented the function from running twice with a boolean

let continueInputEvent = true;

function handleInput() {
  if(!continueInputEvent) return;

  // code

  continueInputEvent = false;

  setTimeout(() => {
    continueInputEvent = true;
  }, 0)
}

@erman999 erman999 closed this as completed Sep 5, 2022
@erman999 erman999 reopened this Sep 5, 2022
@johanneswilm
Copy link
Contributor

@erman999 Does this happen in every browser? That sounds like a browser error to me.

@luisspassos
Copy link

luisspassos commented Oct 17, 2022

I think that its an issue from Input Method Editor of OS, like Windows

@johanneswilm
Copy link
Contributor

@erman999 @luisspassos So this is happening in both Firefox and Chrome on Windows? And it does not happen if you use another IME to input those emojis? If it is an issue that is internal to one particular IME, then it's not something we can do anything about. Hopefully someone at the company selling that IME is responsible and can be contacted.

Or do you think there is some wording in our document that is unclear which caused browser developers to implement it in a way that doesn't make sense? In that case we should change the wording and then contact the developers to fix their implementation.

@luisspassos
Copy link

@johanneswilm It looks like it's a problem with chrome based browsers. In chrome and edge, the emojis double. In Firefox, it's only once.

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

No branches or pull requests

3 participants