mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-19 15:51:33 +00:00

This overrides the jump-to-line other tools might have requested if the editor was not already active. The idea was to restore the scroll position after the editor was hidden and then shown again but the functionality regressed when bug 816967 was fixed. Now that Style Editor uses CodeMirror the scroll position can be restored by calling refresh on the CodeMirror instance. If a specific line to focus was specified, refreshing the editor is a no-op as it was done when the line was selected. However, if the editor was not refreshed after the editor became visible again (i.e. a line to jump to was not specified), refreshing it will restore the previous scroll position.