Currently, in firefox when you open the developer tools panel and debug a document in the debugger tab and try to apply a marker to a line it works just fine. Although if you switch tabs, changing the visibility of the debugger tab to hidden then go back to the debugger tab you will see that the lines viewed in the document are still the same, which is good. Although, when you go to add a marker on a line without scrolling or clicking anywhere in the codemirror editor, the marker will be applied to a line near the top, rather than what is displayed.
Here is the original issue that I am working on: https://github.com/devtools-html/debugger.html/issues/4852.
Here is a gif showing what was described.
https://user-images.githubusercontent.com/254562/36548013-2c8965d0-17bd-11e8-9d8f-bd6652b5e1df.gif
So far I have tried detecting when the change in visibility occurs and when the editor becomes revisable, calling a codeMirror.refresh(), and also signalling different codeMirror events such as “refresh”, “update”, and a few others with CodeMirror.signal(…). The only thing that has worked thus far is to get the scrollInfo which seems to correspond to that of what is seen in the browser and scroll to the respective line.
I was just wondering if anyone had any recommendations on what I should do next. Let me know if this should be opened as a issue in the github repo and I would love to help with implementing a solution.
UPDATES:
- This is not an issue when running the debugger simply by itself as its own application not in the firefox panel. After looking at the signals sent out in each case upon a visibility change, it was found that only in the breaking case (the firefox panel) does the codeMirror editor fire a “refresh” signal.
- After looking into where the refresh is sent from, it is sent from onResize --> setSize.