Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

5084 - [CallStack] clicking the selected frame does not jump #5316

Merged

Conversation

Fischer-L
Copy link
Contributor

Associated Issue: #5084

Summary of Changes

Do selectFrame still on onMouseDown/onKeyUp even the frame given is selected already. To re-select the frame will trigger selectLocation again [1] so it will jump back to the paused line if scroll the line out of the view. If the line was within the view, then it just select the selected frame more one time.

[1] https://github.com/devtools-html/debugger.html/blob/7985f7e5e17de7ae026b609b7e740696663c8a2b/src/actions/pause/selectFrame.js#L25

Screenshots/Videos

5084

@jasonLaster
Copy link
Contributor

Thanks!

@jasonLaster
Copy link
Contributor

i wonder how this updates if you just scroll out of view, because redux wont have changed...

@Fischer-L
Copy link
Contributor Author

@jasonLaster
To re-select the frame will trigger selectLocation again [1], which will dispatch "SELECT_SOURCE" action. The "SELECT_SOURCE" reducer [2] will set the state again so the state's reference changes.

[1] https://github.com/devtools-html/debugger.html/blob/7985f7e5e17de7ae026b609b7e740696663c8a2b/src/actions/pause/selectFrame.js#L25

[2] https://github.com/devtools-html/debugger.html/blob/04a6801de5493f2567fe1342d8bb1406140e07d4/src/reducers/sources.js#L73

@jasonLaster
Copy link
Contributor

@bomsy i know you were in here recently. What do you think?

@bomsy
Copy link
Contributor

bomsy commented Feb 6, 2018

@jasonLaster @Fischer-L
The change looks ok! i think selectSource might be remounting the source again..maybe! not sure... will test and see.
@Fischer-L How are the right click behaviors?

@bomsy
Copy link
Contributor

bomsy commented Feb 6, 2018

Will test fully in a bit!

@Fischer-L
Copy link
Contributor Author

@Fischer-L How are the right click behaviors?

@bomsy The code guards on the mouse event which == 3 so the right click would return early, The keyboard is similar; only enter works.

Copy link
Contributor

@bomsy bomsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jasonLaster jasonLaster merged commit 413973e into firefox-devtools:master Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants