Closed Bug 906617 Opened 6 years ago Closed 6 years ago

Change Gaia keyboard app to use the new composition methods in IME WebAPI

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:koi+, b2g-v1.2 fixed)

RESOLVED FIXED
1.2 C4(Nov8)
blocking-b2g koi+
Tracking Status
b2g-v1.2 --- fixed

People

(Reporter: rudyl, Assigned: lchang)

References

Details

(Whiteboard: [ft:system-platform], [3rd-party-keyboard] )

Attachments

(2 files)

After Bug 904530 is landed, before the word suggestion is not confirmed by the user, we need use composition related methods instead of directly sending keys to the input field.

The related changes reside in the latin IME engine of Gaia keyboard app.
blocking-b2g: --- → koi?
Whiteboard: [ft:system-platform]
Assignee: nobody → lchang
Attached image Screenshot
Flags: needinfo?(xyuan)
Comment on attachment 802794 [details]
Screenshot

Hi Xulei,
I'm testing the setComposition API and found that there is no underline on it.
Is it the current design?
It is a bug with the setComposition API, which only occurs on device.
Flags: needinfo?(xyuan)
Bug 915079 was filed to track the composition text style issue.
Thanks, Xulei.

I have an additional question that I can't set the cursor of composition text to the beginning.
It will set the cursor position to the rear if I set the second argument of "setComposition" to 0.
Attached file Pull Request
The Firefox nightly build appears to haven't supported the setComposition/endComposition APIs yet so I kept the original method as a fallback mechanism.
Attachment #803528 - Flags: review?(rlu)
Nominate it to be a blocker due to functional issue
blocking-b2g: koi? → koi+
Blocks: 1.3-keyboard
Firefox nightly build has supported |setComposition/endComposition|.
Depends on: 927744
Target Milestone: --- → 1.2 C4(Nov8)
Comment on attachment 803528 [details]
Pull Request

r=me with some nits/questions addressed.
Please refer to github pull request for details.

Luke, thanks.
Attachment #803528 - Flags: review?(rlu) → review+
Hi Xulei, I have two questions and need your help.

1. Firefox nightly 27.0a1 (2013-10-24) still appears not to support "setComposition / endComposition".
2. I can't just use "endComposition" to send a string if I don't call "setComposition" prior to it. Is it by design?

Thanks.
Flags: needinfo?(xyuan)
Luke, please help land this first and open another bug for tracking the question in comment 10.
Thanks.
Status: NEW → ASSIGNED
Whiteboard: [ft:system-platform] → [ft:system-platform], [3rd-party-keyboard]
travis passed:
https://travis-ci.org/mozilla-b2g/gaia/builds/13026103

merged in gaia master:
https://github.com/mozilla-b2g/gaia/commit/f72cdd166202d6dafa084dfa12ab8ce292842750

Rudy, thanks for your review!
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Please help set the status so that this will get uplifted to v1.2 branch as well.
Thanks.
Uplifted f72cdd166202d6dafa084dfa12ab8ce292842750 to:
v1.2: 7685e70805e92f68e4c5d1773b5ce608256a1ee9
(In reply to Luke Chang [:lchang] from comment #10)
> Hi Xulei, I have two questions and need your help.
> 
> 1. Firefox nightly 27.0a1 (2013-10-24) still appears not to support
> "setComposition / endComposition".
The API has been exposed and supported, but bug 911951 broke it.
Thanks for reporting the bug. I'll fixed it soon.

> 2. I can't just use "endComposition" to send a string if I don't call
> "setComposition" prior to it. Is it by design?
Yes, it is by design. Though we don't suggest, you can use "replaceSurroundingText" instead of 
"endComposition" to commit text with or without calling "setComposition"
in advance.
Flags: needinfo?(xyuan)
You need to log in before you can comment on or make changes to this bug.