From technomage.talk on August 03, 2011 04:35:18
What steps will reproduce the problem? 1.createCssClassApplier 2.apply to all ranges in selection (rangy.getSelection().getAllRanges() - done in response to selecting one word of text (double-click) 3.call undoToRange What is the expected output? What do you see instead? Expect selection markers to be removed; one marker remains in before and after the selected word What version of the product are you using? On what operating system? 1.1.1 and 1.1.2, OSX Safari 5.1 (6534.50) (also on Chrome) Please provide any additional information below. Basic idea is to convert the selection into a jQuery selection with the bits that the css applier splits up. I save/restore the selection around the css applyToRange call, otherwise the cssClassApplier destroys the current selection.
Original issue: http://code.google.com/p/rangy/issues/detail?id=65
该提问来源于开源项目:timdown/rangy