Ticket #1281 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

selectNodeContents is borken in IE when the node is a text node

Reported by: douglas Owned by:
Priority: normal Milestone: 0.96
Component: Browsers_InternetExplorer Version: trunk
Severity: normal Keywords: ie
Cc:

Description

Passing a text node to selectNodeContents causes an exception in Internet Explorer. This is because moveToElementText, the function behind the existing algorithm, doesn't work with text nodes.

Change History

Changed 5 years ago by douglas

  • status changed from new to closed
  • resolution set to fixed

r1041 Fixes this by using the parentNode as a starting point and adjusting the selection from either side until it only contains the text node.

Note: See TracTickets for help on using tickets.