Comments (3)
@leewes thanks for filing this! I have to admit I’m a noob when it comes to IME’s of any kind and a bit unsure how to even begin testing them. Perhaps you could assist me somewhat. The mask input uses the beforeinput
event — do you have any thoughts on how I could simulate an IME interaction to test what kind of events we are receiving at that event?
from formkit.
The mask input uses the beforeinput event — do you have any thoughts on how I could simulate an IME interaction to test what kind of events we are receiving at that event?
@justin-schroeder certainly! Though granted I'm also a bit new at this as well, so bear with me 😅
I'm not sure if there's a good way to simulate them without an IME.. From what I could tell by monitoring the element, IME inputs trigger composition
events in addition to the key press, beforeInput
, and input
events.
Not sure if this might help, but I created a somewhat incomplete example in sandbox:
that generates an composition event with the data
of the v-model
-ed value of a Dispatched Event Data field and fires the set of events in order when the buttons below are clicked. Each button represents a key press in IME and fires them in the order observed from monitoring the input.
Example:
Generally the events are fired in this sort of sequence
- start -> update (x times) -> end (from enter or clicking out)
for a string input like テスト
it's
- composition start, the dispatched data is
t
on first key press in IME (key code isT
) - composition updates
- The dispatched event
data
values on each following key press
i.テ
on second key press (key code isE
)
ii.テs
on third key press (key code isS
)
iii.テス
on fourth key press (key code isU
)
iv.テスt
on fifth key press (key code isT
)
v.テスト
on sixth key press (key code isO
)
- composition end, the value in the field is
テスト
on 'Enter' key press
from formkit.
For reference, a true ime input on a simpler string input like aa
-> ああ
looks like this on the events fired:
from formkit.
Related Issues (20)
- Custom @remove-icon-click function doesn't override native remove handler HOT 6
- Datepicker cannot parse escaped tokens
- i18n - add language - Macedonian HOT 1
- Form flickers between valid and invalid state while user is typing HOT 2
- Togglebuttons: Certain ARIA roles must be contained by particular parents [accessibility] HOT 3
- Togglebuttons: Elements must only use supported ARIA attributes & Required ARIA attributes must be provided [accessibility] HOT 2
- [Autcomplete] Keep already fetched options displayed instead of showing "loading" section HOT 1
- Mask removes fractional separator HOT 1
- Togglebuttons: <li> elements must be contained in a <ul> or <ol> [accessibility] HOT 2
- Autocomplete build issue when upgraded from 0.122.16 to 0.123.1 HOT 2
- Taglist-Options flying in with AutoAnimatePlugin HOT 1
- Pro Slider show-input inputs not reactive HOT 2
- beforeStepChange in multi step plugin is fired without step change HOT 2
- FormKit Currency `max` prop not allowing decimal points. HOT 1
- Taglist field not deleting items on click / backspace HOT 12
- Listbox and deletion issues with autocomplete, dropdown, and taglist at FormKit Pro v0.125.0 HOT 2
- Prefix Icon not aligned in Datepicker HOT 2
- Multi-input validation fails to update when there are multiple rules
- Missing loading-state when using `multiple` and `optionLoader` on Autocomplete
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formkit.