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

Chrome 117 이슈 대응 #36

Merged
merged 1 commit into from
Oct 31, 2023
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
9 changes: 7 additions & 2 deletions src/android/Reader.es6
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,17 @@ export default class Reader extends _Reader {
android.onNodeLocationOfCurrentPageFound(location);
}

fixColumnCollapseIssue() {
const id = 'LayoutNG-last-sentence-missing-error-workaround'; // Chromium 86~89 with LayoutNG Fragment enabled.
fixColumnCollapseIssue(padding) {
// Chromium 86~89 with LayoutNG Fragment enabled.
// - 마지막 문장이 유실되는 문제
// Chromium 117 ~
// - body padding이 문시되는 문제 (두쪽 보기가 홀수로 떨어지는 경우 우측을 빈 페이지로 만들기 위한 패딩이 일부 무시됨)
const id = 'LayoutNG-last-sentence-missing-or-body-padding-ignored-error-workaround';
let div = document.getElementById(id);
if (!div) {
div = document.createElement('div');
div.setAttribute('id', id);
div.setAttribute('style', `height: ${padding}px;`);
document.body.appendChild(div);
}
}
Expand Down
Loading