Closed
Bug 935858
Opened 11 years ago
Closed 7 years ago
[Keyboard] The "sendString" method will be removed from "keyboard.js"
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: lchang, Unassigned)
References
Details
After Bug 906617 is landed, we have passed the new APIs (setComposition / endComposition) to the "init" function of layout engine. We suppose layout engines use these two APIs to replace the old ones (sendPendingSymbols / sendString). The "sendString" method will be removed from "keyboard.js" after Korean, Japanese and Pinyin engine change to new APIs.
Comment 1•11 years ago
|
||
Why not remove sendString? |sendString| is used to send string without composition. It is the case of auto-correction and suggestion for the latin IME. Also the word prediction feature (showing a list of related words after user input a word) requires sendString without composition as well.
Comment 2•11 years ago
|
||
|the word prediction feature| is part of Pinyin IME and the related code is: https://github.com/mozilla-b2g/gaia/blob/690275d455d210ed781cbbbbfc789ad3ca7a54c8/apps/keyboard/js/imes/jspinyin/jspinyin.js#L658
Reporter | ||
Comment 3•11 years ago
|
||
To my knowledge, the compositionstart/compositionupdate/compositionend events will still be triggered in desktop browsers when we try to send word predictions through input methods without composition. According to W3C composition events, I suppose all the characters sent from input methods, that means not from native keyboard directly, should be sent by composition APIs (with composition events). Another reason is that I think it's more reasonable for web to send a string together at one time without triggering multiple key events.
Comment 4•11 years ago
|
||
We should use "replaceSurroundingText" to implement "sentString" without triggering multiple key events. "replaceSurroundingText" is much efficient than "setComposition".
Reporter | ||
Comment 5•11 years ago
|
||
I think the meaning of "replaceSurroundingText" still not suit the use case of "sendString" because it doesn't need to trigger any composition event in general. In most of mobile devices, web pages won't receive any composition and key events when using auto-correcting function but will receive composition events when using word-predicting function without key events. I guess we need to distinguish each use case with its events. In this bug, however, we have already passed the "replaceSurroundingText" API to every layout engines so I think we can still remove the "sendString" method here to let the layout developers know that they need to use either "replaceSurroundingText" or "setComposition" to send a string instead of "sendString".
Reporter | ||
Updated•10 years ago
|
Assignee: lchang → nobody
Comment 7•7 years ago
|
||
Firefox OS is not being worked on
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•