Closed Bug 1552061 Opened 5 years ago Closed 5 years ago

Switching files resets currently focused location

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: Harald, Assigned: davidwalsh)

References

(Blocks 1 open bug)

Details

(Whiteboard: [debugger-mvp])

Attachments

(1 file)

What were you doing?

  1. Open a source #a in debugger and scroll down and to the right, setting a cursor somewhere in a longer line.
  2. Open another source #b.
  3. Navigate back to source #a

Alternative

  1. Pause in source #a
  2. Switch from #b to #a

What happened?

Source #a always opens scrolled to the top.

When paused the first line in source #a gets an animation highlight for no reason.

What should have happened?

Remember the current scroll and cursor position.

I believe this is similar to https://github.com/firefox-devtools/debugger/issues/7951

[Tabs] selecting a tab should return to the prior location #7951

Blocks: dbg-frontend
Priority: -- → P3

I and David proposed a couple of solutions but David said they weren't elegant enough.

My PR: https://github.com/firefox-devtools/debugger/pull/8076
David's PR: https://github.com/firefox-devtools/debugger/pull/8102

Can you recommend a better approach ?

Flags: needinfo?(jlaster)
Assignee: nobody → dwalsh
Blocks: dbg-69
Flags: needinfo?(jlaster)

Sorry Dhyey, it's been awhile and I've forgotten. I think my thinking was we should be able to have a field selectedSource in the reducer that we set if that is you select a tab. At that point the editor would update, but we would not try and scroll.

Whiteboard: [debugger-mvp]

Ensures scroll position stays the same between tab switches while paused and not paused.

Status: NEW → ASSIGNED
Pushed by dwalsh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f96077d464a
Keep scrolling location for individual documents r=jlast
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: