Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #3d-tasks/18524: Error: [Assets] _updateAdaptResult Invalid size #18164

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pal/screen-adapter/web/screen-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
return new Size(width, height);
case WindowType.Unknown:
default:
return new Size(0, 0);
return new Size(1, 1);
}
}
private get _windowType (): WindowType {
Expand Down Expand Up @@ -530,7 +530,7 @@
} else {
const winWidth = window.innerWidth;
let winHeight = window.innerHeight;
//On certain android devices, window.innerHeight may not account for the height of the virtual keyboard, so dynamic calculation is necessary.

Check warning on line 533 in pal/screen-adapter/web/screen-adapter.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 153. Maximum allowed is 150
const inputHeight = document.body.scrollHeight - winHeight;
if (systemInfo.os === OS.ANDROID && winHeight < inputHeight) {
winHeight += inputHeight;
Expand Down
Loading