Skip to content

Commit

Permalink
fix: 🐛 修复卷轴模式下打开设置面板后无法滚动页面的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hymbz committed Jul 27, 2024
1 parent e6eb7f0 commit 04a21ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Manga/defaultButtonList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { t } from 'helper/i18n';

import { IconButton } from '../IconButton';

import { _setState, store } from './store';
import { _setState, refs, store } from './store';
import { SettingPanel } from './components/SettingPanel';
import {
nowFillIndex,
Expand All @@ -25,6 +25,7 @@ import {
switchTranslation,
isTranslatingImage,
isOnePageMode,
isScrollMode,
} from './actions';
import classes from './index.module.css';

Expand Down Expand Up @@ -141,6 +142,9 @@ export const defaultButtonList: ToolbarButtonList = [
<div
class={classes.closeCover}
on:click={handleClick}
onWheel={(e) => {
if (isScrollMode()) refs.mangaBox.scrollBy({ top: e.deltaY });
}}
role="button"
tabIndex={-1}
/>
Expand Down

0 comments on commit 04a21ca

Please sign in to comment.