-
Notifications
You must be signed in to change notification settings - Fork 954
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
Form updates break character composition mode in Safari #3322
Comments
SteffenDE
added a commit
that referenced
this issue
Jul 2, 2024
Safari breaks character composition mode if an input is patched while a composition is in progress. This commit works around this by ignoring input events that are triggered while a composition is in progress and emitting the event only after the composition is finished. Fixes #3322.
@woylie can you please try |
I'm not familiar with composition mode, but the idea is to skip sending an event to the server while compositing and only trigger the regular phx-change after it is finished. |
Confirmed working! |
SteffenDE
added a commit
that referenced
this issue
Jul 18, 2024
Safari breaks character composition mode if an input is patched while a composition is in progress. This commit works around this by ignoring input events that are triggered while a composition is in progress and emitting the event only after the composition is finished. Fixes #3322.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears that form updates break the character composition mode for Japanese input sources (and potentially other input sources with character composition) in Safari under certain conditions.
Environment
Setup
The demo application (https://github.com/woylie/jp_input) was generated with
mix phx.server
andmix phx.gen.live
.Other than replacing
type="text"
withtype="textarea"
, no changes were made.git clone https://github.com/woylie/jp_input
cd jp_input
mix setup
mix phx.server
Japanese - Romaji
as an input source as described here: https://support.apple.com/guide/japanese-input-method/set-up-the-input-source-jpim10267/macReproduction
Edit
on the existing thing.return
to create a new line in the middle.d
and thene
.What should happen
d
, the letterd
should appear in the textarea with a thick underline.e
, the letterd
in the textarea should be replaced with aで
.return
to confirm the character, the underline disappears.The thick underline indicates character composition mode, in which you can choose different candidates with the
space
key.What really happens
d
, the letterd
appears in the textarea without the underline.e
, the characterえ
(e) appears in the textarea. The textarea now contains the textdえ
instead ofで
.Observations
Edit
link, character composition works.phx-change
from the form, the issue disappears.Resources
The text was updated successfully, but these errors were encountered: