[Editor] Adding a breakpoint should not cause the editor to scroll
Steps to reproduce:
- Launch the latest Nightly
- Go to about:home
- Open Debugger
- Open resource://activity-stream/data/content/activity-stream.bundle.js
- Scroll down about one or two page <- This is an important step for reproducing
- Add breakpoint (e.g. Click line number 104) <- This step works
- Remove breakpoint
- Switch DevTools tab, then go back Debugger
- Add breakpoint in line 104 <- No response (or make a breakpoint in other line)
- Click in code view -> cursor will be jump to other line
Actual Results: Add breakpoint is no response (or make a breakpoint in other line) after switching DevTools tab. If you click in code view, cursor will be jump to other line.
Expected Results: Add breakpoint works even if after switching DevTools tab. Cursor does not jump to other line.
Note that this behavior seems to depend on your toolbox height. I was about to log a different bug, but I think it would be a duplicate so I'll just add my STRs here.
STRs:
- make sure to use a rather small toolbox height (you can set devtools.toolbox.footer.height to 250 in about:config for instance, assuming toolbox docked to the bottom)
- go to http://firefox-dev.tools/debugger-examples/examples/todomvc/
- set a breakpoint in app-view.js, render() method, line 52
- add to todo to break on your breakpoint
- switch to console, switch back to debugger
- click on your breakpoint in the gutter to delete it
AR: Breakpoint is added at line 15 ER: Breakpoint is deleted
Note that the behavior really changes depending on the toolbox height. With 300px instead of 250px, clicking on the breakpoint does nothing. With 400px, the buggy breakpoint gets added on line 24 instead of 15.

Oh yeah, this is certainly an interesting codemirror bug. I think it will likely turn out that codemirror needs to be forced to update when we re-display the document or make the UI visible.
Great catch!
by the way, I reproduced by going to todomvc and todo-view.js:104 http://firefox-dev.tools/debugger-examples/examples/todomvc/

@mcote is working on it
so this is still an issue because we no longer use the visibility handler
I recall being able to reproduce this in the past but I cannot reproduce with a fresh build off of master.
Can't reproduce either on the latest Nightly, this seems fixed. Maybe a codemirror update?