wijmo/Wijmo-Open-Legacy

jQuery 1.9.0 problem with $('strings_with_beginning_spaces)

Opened this issue · 0 comments

Hi.
Found a small problem in the jquery.wijmo.wijcalendar.js file, line 2284 under the htmlTextWriter function:

toString: function () {
return this._html.join('');
}

...doesn't work with jQuery v1.9.0 without using the migration tool. This code does:

    toString: function () {
        var joined = this._html.join('');
        return jQuery.trim(joined);
    }

Apparently, jQuery made changes to the $() function for creating DOM objects from text such that it now fails for strings beginning with whitespace (maybe ending too?). Anyway, just add a jQuery.trim() to your code and it's back to normal