Sitelet https://github.com/microsoft/vscode-python-devicesimulator/pull/323
Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Fix issue where incorrect device was loaded - #323

Merged
Kevin Nguyen (xnkevinnguyen) merged 1 commit into
devfrom
users/t-xunguy/render-fix
Apr 13, 2020
Merged

Kevin Nguyen (xnkevinnguyen) merged 1 commit into
devfrom
users/t-xunguy/render-fix

Conversation

@xnkevinnguyen

Copy link
Copy Markdown
Contributor

Description:

The incorrect device is loaded whenever multiple devices were loaded in a row, then a rerender of the webview loads the incorrect device.

Steps to reproduce:
1- Load device 1
2-Load device 2
3- Hide the webview simulator by switching window
4- Focus again on webview simulator

Current behaviour: Device 1 will load
Expected behaviour: Device 2 should load

The fix is to load the new html with correct device instead of saving it as a React state. Since rerender can be triggered, the react state can be lost, but html variables will persist.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good catch, fixes issue for me. LGTM!

@vandyliu Vandy Liu (vandyliu) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lovely

@vandyliu
Vandy Liu (vandyliu) deleted the users/t-xunguy/render-fix branch April 13, 2020 20:54
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