[Editor] Context menu `Add conditional breakpoints` should focus condition input
STR:
- Open https://mozilladevelopers.github.io/sample-todo/03-conditional-breakpoints/
- Right click on a line number in Debugger and click
Add conditional breakpoints
AR:
- Input isn't focused
ER:
- Focus input field to start typing condition
This works as expected when the breakpoint is created normally and then made conditional by right clicking Add condition in the Breakpoints section.
/claim
Thanks for claiming the issue! :wave:
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
I wasn't able to reproduce the issue. Possible to send a gif of the AR @digitarald?

Not working for me in Nightly/OSX using the STR.
I was not able to reproduce on Nightly and Chrome on Windows 10. Could this be specific to OSX?
@AlexisDeschamps yeah - it could be...
It seems that the problem arises when the Debugger is used within a panel instead of just the launchpad.
Doing this simple check:
const activeElementIsFocused =
document.activeElement == this.input && document.hasFocus();
console.log("Input is focused:", activeElementIsFocused);
Right after the this.input.focus() in the renderToWidget it will always return true whether the conditional panel input is focused or not. Whereas, if you add in a componentDidUpdate section and check under that lifecycle event this will accurately return true when the input box shows focused and false when the input box is not focused.
This tells me that somewhere in between renderToWidget and componentDidUpdate the input loses focus.. sometimes.
Originally I fixed the issue with a setTimeout in the renderToWidget, thereafter I changed the fix to just put the this.input.focus() into the componentDidUpdate.
Currently, I am writing a mochi test for the issue.
@digitarald is it fixed for you now?
@lukaszsobek not yet. We're still working on landing a patch that passes mochitests