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

页面不能滚动 #10

Closed
jjljyn opened this issue Apr 14, 2017 · 4 comments
Closed

页面不能滚动 #10

jjljyn opened this issue Apr 14, 2017 · 4 comments

Comments

@jjljyn
Copy link

jjljyn commented Apr 14, 2017

你好,
我在写一个 Vue + Vue-Router 的 SPA 项目,输入框使用的你写的这个插件,很好用,我很喜欢。在使用过程中发现两个小 bug 。

  1. 在使用全屏对照编辑(side-by-side)的时候,编辑完成按 ESC 退出全屏,这个流程没有问题。
    问题是这样的,使用 side-by-side 后不按 ESC ,而是点击浏览器的返回按钮,再进入这个页面的时候回出现页面不能滚动的情况。再按 ESC 页面就又能滚动了。

  2. 使用预览功能(preview),在文本框内可以预览 HTML 的效果,这里也没有问题。
    问题是这时候再点击全屏,不按 ESC 而点击浏览器返回按钮,再进入这个页面,会出现和上面一样的问题。

目前我的解决办法是在 hideIcons 中添加了 side-by-side、fullscreen 来隐藏掉这两个功能。

@F-loat
Copy link
Owner

F-loat commented Apr 16, 2017

可以试下在activated钩子中执行以下代码,我之后看下能不能在插件中完成处理

const editor = this.simplemde;
if(editor.isSideBySideActive() || editor.isPreviewActive()) editor.toggleFullScreen();

@beaplat-61f
Copy link

@jjljyn 请问如何全屏对照编辑呢

@jjljyn
Copy link
Author

jjljyn commented Apr 21, 2017

@beaplat-61f

    export default {
      data () {
        return {
          configs: {
            toolbar: ['bold', 'italic', 'heading', '|', 'quote', 'side-by-side']
          }
        }
      }
    }

上面side-by-side就是全屏对照编辑的功能,这个是功能是默认开启。

@beaplat-61f
Copy link

@jjljyn 感激不尽

@F-loat F-loat closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants