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

Bug: does not work for inputs and textareas in Google Chrome #86

Closed
emerencia opened this issue Mar 7, 2019 · 3 comments
Closed

Bug: does not work for inputs and textareas in Google Chrome #86

emerencia opened this issue Mar 7, 2019 · 3 comments
Labels

Comments

@emerencia
Copy link

Rikaichamp doesn't work for kanji in text inputs or textareas. It does work on kanji in other element son the same page.

I don't see any errors in the console, and I get the same behavior when I enable it to work in incognito mode and run the browser in incognito mode (which means it's the only extension running at that time), and then it still doesn't work in textareas/text inputs. This is on MacOs Mojave, Chrome v. 73.0.3683.56.

I just pulled the master branch to get the latest version of everything and ran the npm install and npm run build:chrome commands.

I made a small recording to illustrate the problem I'm having: https://streamable.com/n1yhc

@birtles
Copy link
Member

birtles commented Mar 10, 2019

This appears to be because Chrome doesn't support carentPositionFromPoint (only caretRangeFromPoint) and when I pass caretRangeFromPoint the coordinates of a text box, it returns the <body> element. That may be why rikaikun had to resort to temporarily creating fake elements to cover over text boxes (see melink14/rikaikun#16 (comment)).

I was really hoping not to re-introduce that (I'm afraid that manipulating the DOM like that will break some apps) but I might have to unless Chrome fix their bugs or implement caretPositionFromPoint. That's going to be a big project since I should probably drop all the existing text box handling from Rikaichamp at the same time so that both Firefox and Chrome end up using the same approach. Ugh.

@birtles
Copy link
Member

birtles commented May 14, 2021

This should now be fixed. You can give it a try at: https://chrome.google.com/webstore/detail/pnmaklegiibbioifkmfkgpfnmdehdfan

@birtles birtles closed this as completed May 14, 2021
@emerencia
Copy link
Author

Awesome! I'll check it out

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

No branches or pull requests

2 participants