IE TextRange select method not working properly

前端 未结 4 845
面向向阳花
面向向阳花 2020-12-28 11:50

I\'m having an unusual problem with an IE document with contentEditable set to true. Calling select() on a range that is positioned at the end of a text node that immediate

4条回答
  •  长发绾君心
    2020-12-28 12:39

    Maybe I misunderstand, but if I click to the right of that first line, my cursor already immediately appears at the start of the second line, so that's not a TextRange issue, right?

    Adding a doctype so the test page is rendered in standards mode instead of quirks mode fixes that for me.

    And I can't reproduce what your myhandler function does, because clicking that button moves the focus away to the button so I can no longer see the cursor and can't get it back either. Finding the cursor position in a contentEditable area seems to be a different problem altogether.

提交回复
热议问题