Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The media plugin of ckeditor is not working in IE9 and below:
SCRIPT438: Object doesn't support property or method 'createRange'
plugin.js, line 31 character 17
I've also added a possible patch for this (don't know 100% sure if this is the correct solution), please review
Comment | File | Size | Author |
---|---|---|---|
#5 | ckeditor-media_ie_fix-1914904-5.patch | 863 bytes | MiroslavBanov |
#4 | ckeditor-media_ie_fix-1914904-4.patch | 766 bytes | rooby |
ckeditor-media_plugin_ie9_and_below.patch | 555 bytes | filsterjisah | |
Comments
Comment #1
rooby CreditAttribution: rooby commentedWorks for me.
RTBC to get maintainer eyes on it.
Comment #2
rooby CreditAttribution: rooby commentedActually, it doesn't seem to work with IE7.
You get:
Comment #3
rooby CreditAttribution: rooby commentedNow I'm getting that error in IE8 as well.
Weird because I'm sure it worked a couple of times.
Not sure if it is related to using IE9 in IE8 & IE7 modes.
Comment #4
rooby CreditAttribution: rooby commentedThis works (tested in IE 7, 8, 9, 10, FF 20, Chrome 26, Safari 6) however I'm wondering why isn't already like this and I'm guessing it is because the getSelectedText() function was not in ckeditor until version 3.6.1, which means if we switch to this then users will have to upgrade to at least 3.6.1.
3.6.1 has been out for almost 2 years so I think it is ok to say ckeditor module 7.14 requires the ckeditor plugin 3.6.1 or higher.
People will get a better experience with a newer version and it means not having to code around older version quirks.
I'm interested to see what the maintainer's opinion of this is.
Comment #5
MiroslavBanov CreditAttribution: MiroslavBanov commentedI can confirm that patch #4 works with IE8 and IE9. I am also posting an alternative patch that should work for lower version of CKeditror.
Comment #7
wwalc CreditAttribution: wwalc commentedThe code makes sense so I pushed it, though the plugin itself should be dropped as requested in #2140155: Remove media plugin, once this ticket is closed: #2159403: Make CKEditor plugin system modular and clean
Comment #8
rooby CreditAttribution: rooby commentedThanks. I figured #2159403: Make CKEditor plugin system modular and clean would trump this one.