Closed
Bug 1040603
Opened 10 years ago
Closed 10 years ago
Queue the UserPress events
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1145072
People
(Reporter: timdream, Assigned: rudyl)
References
Details
Attachments
(1 file)
To make bug 1040548 work, UserPress event should be queued and handled only after the previous event is handled. This is the queue to implement before removing the queue in latin.js in bug 1040548.
I think we could use a Promise-based queue, but first we need a timing on when a previous task is considered complete.
I am think about allowing IMEngine to return a promise on selected methods (e.g. click() and select()) and wait for promise to resolve. For IMEngines w/o promise implemented (i.e. if the method returns something not then-able), we consider the next event can be pushed right away.
(There are some edge cases like composition keys which we basically call click() n-times -- we should remove that first.)
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
It ends up that I created an action queue instead of userPress queue, or otherwise we have to return promise from TargetHandlersManager to ActiveTargetManager and to UserPressManager.
Not sure if this is right way to go, but at least we could try the following behavior a bit,
- keep key popup until the sendKey action is resolved.
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8506818 [details]
WIP
Looks good, please complete the patch here that
-- does not remove the queue in latin.js
-- does not change the timing of |visualHighlightManager.hide()|
We should do these two things later in another bug.
PS Your current patch didn't hide the popup at the proposed timing (it hides the popup at the time processing is complete + 75ms)
Flags: needinfo?(rlu)
Attachment #8506818 -
Flags: feedback+
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8506818 [details]
WIP
Tim,
Thanks for the advice, very helpful.
Patch updated to address your comments.
Mind to give it a second look?
--
Also ask for Omega and Bruce to take a look as we discussed in the previous meeting.
Please be informed that right now I would still clear the highlighting effect when you press the next key or otherwise you would see multiple key popups on a slow device, which I think does not make sense.
Flags: needinfo?(rlu)
Attachment #8506818 -
Flags: ui-review?(ofeng)
Attachment #8506818 -
Flags: ui-review?(bhuang)
Attachment #8506818 -
Flags: review?(timdream)
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8506818 [details]
WIP
Not there yet.
Cancelling ui-review because this bug should not have UI changes.
Attachment #8506818 -
Flags: ui-review?(ofeng)
Attachment #8506818 -
Flags: ui-review?(bhuang)
Attachment #8506818 -
Flags: review?(timdream)
Assignee | ||
Comment 6•10 years ago
|
||
The original approach proposed here has been taken to resolve bug 1145072.
So dupe this one to that, the follow-up should be bug 1040548.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•