trigger keypress jquery...and mention pivotal pressed
i have an quarrel component (type=text) textarea component validates boldly triggering specific keystrokes. used chinese pinyin input, example:
the user forms "ma2" an quarrel element. keydown eventuality triggers each keystroke, 2 never appears. instead, user presses "2" "a" accept tinge mark, this: "". end, user have typed: "m".
this achieved reading changing whole quarrel value controlling $(element).val() however, an quarrel component concentration it's value set job .val("something"), cursor moves finish text. works glorious many situations since user only continues typing during finish field, nonetheless i wish work all situations.
...another fortitude problem get/set plcae cursor within an quarrel textarea element. i don't cruise illusory javascript, however.
so, remy right lane sure. triggering keypresses wouldn't grant me quarrel special characters but lot con anyways. instead, i locate keydown eventuality set value input/textarea, following pierce caret.
i haven't found anything good caret getting/setting jquery, nonetheless following unequivocally pennyless problem down me. i'll post couple final pinyin quarrel formula it's stable. it's graceful tie now.
Comments
Post a Comment