Closed Bug 1607686 Opened 4 years ago Closed 4 years ago

Add "beforeinput" to "Event Listener Breakpoints"

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(firefox75 fixed)

RESOLVED FIXED
Firefox 75
Tracking Status
firefox75 --- fixed

People

(Reporter: masayuki, Assigned: farooqbckk, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(3 files, 1 obsolete file)

I'll implement beforeinput event at bug 970802. That's sometimes a pair with input event, but not always. Currently, input event is under "Keyboard" group. So, perhaps, beforeinput should also be added into the group.

FYI: beforeinput event will be landed as disabled by default even in Nightly channel because we need to fix some bugs, implement InputEvent.getTargetRanges(), and finally, we need to contact websites which are broken by firing beforeinput event. The pref will be dom.input_events.beforeinput.enabled.

Keywords: good-first-bug
Priority: -- → P3

See bug 1588007 for a patch that added the fetch event.

Hello Masayuki. I am a new contributor here. Can I work on this bug?

(In reply to theprover from comment #2)

Hello Masayuki. I am a new contributor here. Can I work on this bug?

I'm not familiar with the code of DevTools, Harald, could you let us know who is a good mentor for this bug?

Flags: needinfo?(hkirschner)

CC-ing Logan since he knows the event breakpoints code and might be able to suggest a mentor.

I'd be happy to help review this patch. I'd expect it to be relatively straightforward, based on the patch for the issue Harald linked above: https://phabricator.services.mozilla.com/D52297 The main difference is that we'll need to make the entry in the breakpoint list conditional based on Services.prefs.getBoolPref("dom.input_events.beforeinput.enabled") (I assume)

Sorry for not clearing my ni? earlier – are you still interested in working on this, theprover ?

Flags: needinfo?(hkirschner) → needinfo?(theprover97)

Hi, I am a new contributor here. I'd like to explore this one and work on it if theprover is not working on it.

Assignee: nobody → farooqbckk
Status: NEW → ASSIGNED
Attachment #9126658 - Attachment is obsolete: true
Pushed by loganfsmyth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6870283c9949
Add beforeinput to Event Listener Breakpoints. r=loganfsmyth

Sorry about that Farooq, looks like the failure is

Unexpected exception TypeError: can't access property "getBoolPref", Services.prefs is undefined at resource://devtools/server/actors/utils/event-breakpoints.js:162

It looks like Services.prefs is not available in Workers, so we'll want to make sure Services.prefs is truthy first, e.g.

      Services.prefs && Services.prefs.getBoolPref("dom.input_events.beforeinput.enabled")
        ? generalEvent("keyboard", "beforeinput")
        : null,

since beforeinput isn't an issue in workers anyway, we can just ignore that case.

Will do that. On a side note, is there a recommended way to check these kind of errors beforehand?

Flags: needinfo?(farooqbckk)
Pushed by loganfsmyth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8415a5f0b197
Add beforeinput to Event Listener Breakpoints. r=loganfsmyth
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: