【问题标题】:Material UI, internal link scrolling not working on mobileMaterial UI,内部链接滚动在移动设备上不起作用
【发布时间】:2021-08-18 14:46:22
【问题描述】:

我正在使用内部链接(例如 /lessons/lesson-slug#heading-slug)在页面上进行内部滚动。所有这些在桌面上都可以正常工作,但在移动视图上会因为覆盖的抽屉导航组件而中断。查看屏幕录像:

我无法确定问题出在哪里...我已经尝试在 Drawer 组件上传递这些 ModalProps,但到目前为止还没有运气:

ModalProps={{
            hideBackdrop: true,
            disableScrollLock: true,
            disablePortal: true,
            disableAutoFocus: true
          }}

有什么想法吗?提前致谢。

【问题讨论】:

    标签: javascript reactjs material-ui next.js


    【解决方案1】:

    添加disableEnforceFocus: true 修复它。

    【讨论】:

      猜你喜欢
      • 2017-11-26
      • 2021-02-07
      • 1970-01-01
      • 2018-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多