#18436 closed defect (fixed)
FindReplace Plugin not working in IE11
Reported by: | eoinocon | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.7.9 |
Component: | Editor | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Noticed a problem in IE11 with the FindReplace? plugin. Find does not find or highlight the searched for text within the editor.
Can be seen on the Basic Usage example in the Documentation: http://dojotoolkit.org/reference-guide/1.10/dojox/editor/plugins/FindReplace.html
Attachments (2)
Change History (13)
comment:1 Changed 6 years ago by
Component: | General → Editor |
---|
comment:2 Changed 6 years ago by
Changed 6 years ago by
Attachment: | FindReplace.js added |
---|
Updated dojox/editor/plugins/FindReplace.js
comment:3 Changed 6 years ago by
I've made some progress on the issue, but still having problems where there are multiple instances of the the text that is being searched for and the user clicks away from the selected text between Find button presses.
For example if there are multiple instances of the search text showing in the editor. Pressing Find will take you to the first, second, third etc. But if you click elsewhere on the editor between Find presses, the next Find continues on from the last position rather than the new cursor position.
comment:4 Changed 6 years ago by
Thanks eoinocon, are you covered by a CLA? If you work for IBM you are covered by the (IBM, CCLA), if not see http://dojofoundation.org/about/claForm Thanks, Ed
comment:6 Changed 6 years ago by
Owner: | set to Ed Chatelain <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:11 Changed 6 years ago by
Milestone: | tbd → 1.7.9 |
---|
In IE11 document.selection is no longer available, but neither is window.find() which is used on the other browsers. For IE11 the doc says: "selection is no longer supported. Starting with Internet Explorer 11, use getSelection."
This works to get around much of this error, (I will attach an update which gets the first Find, Replace and Replace All working), but this fix does not work to find the next occurrence starting at the cursor position. I have not been able to get it to search from the current cursor position because the object returned by getSelection() does not work with createRange() like selection used to.
If anyone knows how to get a TextRange? for the current cursor position on IE11 to use with txtRg.setEndPoint() I would appreciate the input.