weixin_39981360 2020-11-30 05:06
浏览 0

rangy.getSelection() destroys IE's undo capabilities in a contenteditable

From t....nl on November 02, 2011 05:26:36

What steps will reproduce the problem? 1. Given a

text here
2. Type some text, press CTRL-Z and you'll notice that the typed text will disappear 3. Now type some text, run rangy.getSelection(), (bring focus back to contenteditable) and press CTRL-Z; nothing happens

Env: IE8 with rangy 1.2

Original issue: http://code.google.com/p/rangy/issues/detail?id=78

该提问来源于开源项目:timdown/rangy

  • 写回答

6条回答 默认 最新

  • weixin_39981360 2020-11-30 05:06
    关注

    From timd....com on November 02, 2011 10:54:10

    I fear this may be impossible to fix. Doing any DOM mutations breaks the undo stack in IE and for IE < 9, DOM mutations are an integral part of converting a TextRange into a DOM Range in Rangy. I'll look into this but I'm not hopeful of fixing it. I'll add a note to the docs in the meantime.

    Status: Accepted

    评论

报告相同问题?