Closed Bug 706599 Opened 8 years ago Closed 8 years ago

Handle no default in gonk key dispatching

Categories

(Core :: Widget, defect)

All
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: mwu, Assigned: mwu)

References

Details

Attachments

(1 file)

This makes nsEventStatus_eConsumeNoDefault get handled correctly.
Attachment #578035 - Flags: review?(justin.lebar+bug)
Comment on attachment 578035 [details] [diff] [review]
Handle no default in gonk key dispatching

> +    event.flags |= flags;

It would be clearer to do |event.flags = flags|.  Unless event.flags may be non-zero at this point?

For my edification, exactly what problem does this fix?  Is it that if you cancel the keydown, we shouldn't send the keypress?

btw, can you please set git to use more context for diffs?  (Bonus points for using --patience.)
Attachment #578035 - Flags: review?(justin.lebar+bug) → review+
(In reply to Justin Lebar [:jlebar] from comment #1)
> Comment on attachment 578035 [details] [diff] [review] [diff] [details] [review]
> Handle no default in gonk key dispatching
> 
> > +    event.flags |= flags;
> 
> It would be clearer to do |event.flags = flags|.  Unless event.flags may be
> non-zero at this point?
> 

It is set to NS_EVENT_FLAG_TRUSTED.

> For my edification, exactly what problem does this fix?  Is it that if you
> cancel the keydown, we shouldn't send the keypress?
> 

Something like that. I don't remember the details, but it's the right thing to do and all the widget backends should be doing it.
This patch has review and still applies to m-c. Unless there are any objections, I will land this.
https://hg.mozilla.org/mozilla-central/rev/16d41bf6df46
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.