Skip to content

Fix: Chrome + iPad not creating rootElement early enough for custom frontends#410

Merged
mcottontensor merged 2 commits intomasterfrom
fix-ipad-chrome
Jan 19, 2025
Merged

Fix: Chrome + iPad not creating rootElement early enough for custom frontends#410
mcottontensor merged 2 commits intomasterfrom
fix-ipad-chrome

Conversation

@lukehb
Copy link
Copy Markdown
Contributor

@lukehb lukehb commented Jan 17, 2025

Relevant components:

  • Frontend UI library

Problem statement:

The _rootElement in the Pixel Streaming UI library was not created explicitly, but rather created lazily by a getter called rootElement. There were some scenarios where you could trigger internal code paths that used the _rootElement before any call had been made via the getter to initialize it. This would result in a JS error for those calling functions.

Solution

This PR explicitly initializes the _rootElement in the constructor of the Pixel Streaming Application - this way the calling order is no longer important and it is always safe to access the _rootElement.

Test Plan and Compatibility

I have tested this locally using my Chrome browser, but did not have an iPad nearby to confirm. I will get someone to test this downstream once it is landed to confirm the fix is valid.

@lukehb lukehb self-assigned this Jan 17, 2025
@lukehb lukehb added auto-backport Used to specify we want a PR to auto backport to a branch, must be paired with auto-backport-to-UEX. auto-backport-to-UE5.4 Auto backport to UE 5.4 auto-backport-to-UE5.3 Auto backport to UE 5.3 auto-backport-to-UE5.5 labels Jan 17, 2025
@lukehb lukehb requested a review from mcottontensor January 17, 2025 06:54
@lukehb lukehb added the bug Something isn't working label Jan 17, 2025
@mcottontensor mcottontensor merged commit 9e80438 into master Jan 19, 2025
@mcottontensor mcottontensor deleted the fix-ipad-chrome branch January 19, 2025 22:21
@github-actions
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
UE5.4 Backport failed because of merge conflicts

You might need to backport the following PRs to UE5.4:
- Better Safari detection and removing overflow on iPad
UE5.3 Backport failed because of merge conflicts

You might need to backport the following PRs to UE5.3:
- Better Safari detection and removing overflow on iPad
UE5.5

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

backport --pr 410

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@mcottontensor
Copy link
Copy Markdown
Collaborator

💚 All backports created successfully

Status Branch Result
UE5.3
UE5.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

mcottontensor added a commit that referenced this pull request Jan 19, 2025
[UE5.5] Merge pull request #410 from EpicGamesExt/fix-ipad-chrome
mcottontensor added a commit that referenced this pull request Jan 19, 2025
[UE5.3] Merge pull request #410 from EpicGamesExt/fix-ipad-chrome
mcottontensor added a commit that referenced this pull request Jan 19, 2025
[UE5.4] Merge pull request #410 from EpicGamesExt/fix-ipad-chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Used to specify we want a PR to auto backport to a branch, must be paired with auto-backport-to-UEX. auto-backport-to-UE5.3 Auto backport to UE 5.3 auto-backport-to-UE5.4 Auto backport to UE 5.4 auto-backport-to-UE5.5 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants