debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Cannot open "Search for sources" again

Open magicp-github opened this issue 9 years ago • 3 comments

Steps to reproduce:

  1. Start Nightly (or Dev. Edition)
  2. Go to any sites (e.g. about:home)
  3. Open Debugger
  4. Open "Search for sources" (e.g. click [+] or Ctrl+P)
  5. Close "Search for sources"
  6. Open "Search for sources" again

Actual Results: No response. Cannot open "Search for sources" again.

Expected Results: "Search for sources" works after the second times.

magicp-github avatar Mar 17 '17 01:03 magicp-github

I can confirm that we see this error in master branch.

When we try to open SourceSearch after closing it, we see some error in console.

Interestingly, we don't see the error if don't close SourceSearch but instead just switch tab and reopen SourceSearch again.

irfanhudda avatar Mar 17 '17 07:03 irfanhudda

I'll look into this

irfanhudda avatar Mar 17 '17 15:03 irfanhudda

@irfanhudda Looked into it and found the issue.

https://github.com/devtools-html/debugger.html/blob/master/src/components/ProjectSearch.js#L89

This is setting the value to null for whatever reason and then when SearchInput tries calling query.trim() it is a non-existent method.

Making that line setState({ inputValue: "" }); fixes this bug.

wldcordeiro avatar Mar 18 '17 01:03 wldcordeiro