fix: refresh page when vertical writing mode is set (#615)

This commit is contained in:
Huang Xin
2025-03-16 03:07:54 +08:00
committed by GitHub
parent d6962055b9
commit 8775f90bc1
3 changed files with 4 additions and 11 deletions
@@ -191,7 +191,8 @@ const LayoutPanel: React.FC<{ bookKey: string }> = ({ bookKey }) => {
}
if (
prevWritingMode !== writingMode &&
(writingMode === 'horizontal-rl' || prevWritingMode === 'horizontal-rl')
(['horizontal-rl', 'vertical-rl'].includes(writingMode) ||
['horizontal-rl', 'vertical-rl'].includes(prevWritingMode))
) {
setTimeout(() => window.location.reload(), 100);
}