CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11478] Filepicker fails with javascript error in IE11

avatar
Created By: stephen cooper (scooper)
Date Submitted: Wed Jul 12 05:39:27 -0400 2017

Assigned To:
Version: 2.2.2
CMSMS Version: 2.2.2
Severity: Minor
Resolution: Fixed
State: Closed
Summary:
Filepicker fails with javascript error in IE11
Detailed Description:
When loading a default content page or a module that uses the new Filepicker in
IE11 results in a js error:

Object doesn't support property or method 'startsWith'
jquery.cmsms_filepicker.js (79,3)

The Mozilla page at 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
provides the following polyfill:

if (!String.prototype.startsWith) {
    String.prototype.startsWith = function(searchString, position){
      return this.substr(position || 0, searchString.length) === searchString;
  };
}

which fixes the issue.

I just added that polyfill to jquery.cmsms_filepicker.js at line 70 but I'll
leave it to you to decide the best location.

Thanks for all your work as usual.

s.



History

Comments
avatar
Date: 2017-07-16 21:40
Posted By: Robert Campbell (calguy1000)

Fixed in svn
      
avatar
Date: 2017-08-26 11:11
Posted By: Robert Campbell (calguy1000)

v2.2.3 is released
      
Updates

Updated: 2017-08-26 11:11
state: Open => Closed

Updated: 2017-07-16 21:40
resolution_id: => 7