Ticket #351 (closed defect: fixed)
[patch] getSelectedHTML returns 'undefined' if the selection is an image in IE.
| Reported by: | patrick@… | Owned by: | gogo |
|---|---|---|---|
| Priority: | normal | Milestone: | Version 1.0 |
| Component: | Xinha Core | Version: | trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Calling createRange with an image being active (ex: after a click on it) returns a controlRange in IE, not a textRange. Thus, in line 3156 of htmlarea.js :
existing = range.htmlText
existing becomes undefined.
I've made a dirty hack catching length of the range to detect the existence of a controlRange and return the outerHTML of it's first item :
existing = (range.length == 1) ? range(0).outerHTML : range.htmlText;
There should be a better way to do it :)
Change History
Note: See
TracTickets for help on using
tickets.
