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

Fix the issue of incorrect interface adaptation on the web platform in fullscreen mode after rotating the screen. #17780

Merged
merged 1 commit into from
Oct 28, 2024
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 @@ -31,7 +31,7 @@
import { Orientation } from '../enum-type';
import legacyCC from '../../../predefine';
import { checkPalIntegrity, withImpl } from '../../integrity-check';
import { OS } from '../../../pal/system-info/enum-type';

Check failure on line 34 in pal/screen-adapter/web/screen-adapter.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Useless path segments for "../../../pal/system-info/enum-type", should be "../../system-info/enum-type"

interface ICachedStyle {
width: string;
Expand Down Expand Up @@ -386,7 +386,7 @@
// if (!this.handleResizeEvent) {
// return;
// }
this._resizeFrame();
this._updateFrame();
});

const notifyOrientationChange = (orientation): void => {
Expand Down Expand Up @@ -484,7 +484,7 @@
if (mediaQueryPortrait.addEventListener) {
mediaQueryPortrait.addEventListener('change', orientationChangeCallback);
mediaQueryLandscape.addEventListener('change', orientationChangeCallback);
} else if (mediaQueryPortrait.addListener){

Check failure on line 487 in pal/screen-adapter/web/screen-adapter.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Missing space before opening brace
mediaQueryPortrait.addListener(orientationChangeCallback);
mediaQueryLandscape.addListener(orientationChangeCallback);
}
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