CKeditor通过某些CSS跳到顶部 [英] CKeditor jumps to top with certain css

查看:26
本文介绍了CKeditor通过某些CSS跳到顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CKEditor错误跟踪器不会让我提交错误:

==复制步骤==

  1. 添加CSS: body {height:100%;} 移至编辑区域.使用此

    CKEditor bug tracker won't let me submit a bug:

    == Steps to reproduce ==

    1. add the css: body { height:100%; } to an editing area. Use this page and edit the CKEditor area's css with FireBug.

    2. Now scroll down and change the bottom H2 to H3 with the drop-down

    3. It jumps to the top.

    Expected result: Without adding the css or if you deactive it, it behaves correctly, ie., it doesn't jump to the top.

    Actual result: It jumps to the top.

    Other details (browser, OS, CKEditor version, installed plugins): Broken in FireFox 42 on OS X. Chrome seems to work OK?

    In this old discussion people tracked the issue down to their "contentsCss" but didn't further isolate it to this particular issue.

    解决方案

    Please have a look at attached image. When you set body to 100% it only takes size of the viewport and not the whole body. You can see this clearly when scrolling down the editor. If on the other hand you disable the height:100%, you will see that body is as high as the content.

    If you are worried about one line height body when there is no content in the editor then perhaps you might want to use min-height as mentioned here.

    I don't see any issue with the editor here because it behaves as expected - it scrolls to top where the body actually is.

    这篇关于CKeditor通过某些CSS跳到顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆