-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deckgrid does not work in IE11 #86
Comments
We are facing the same issue. Our application is not loading in IE11, getting the below error in console, Could you please let us know any solution available for this or please let us know where this hack can be applied. Thanks in advance! |
Same here. Deckgrid.prototype.$$getLayout = function $$getLayout () {
var content = $window.getComputedStyle(this.$$elem, ':before').content,
layout;
if (content) {
content = content.replace(/'/g, ''); // before e.g. '3 .column.size-1of3'
content = content.replace(/"/g, ''); // before e.g. "3 .column.size-1of3"
content = content.split(' ');
if (2 === content.length) {
layout = {};
layout.columns = (content[0] | 0);
layout.classList = content[1].replace(/\./g, ' ').trim();
}
}
return layout;
}; If you exchange the first three lines of the function with this: Deckgrid.prototype.$$getLayout = function $$getLayout () {
var styles = $window.getComputedStyle(this.$$elem, ':before'),
layout, content;
// console.log(styles);
content = styles.content; and then use the debugger to inspect respectively the I am deeply puzzled. (Edit: Added an outcommented console.log(styles) to illustrate) |
GaryWenneker's workaround seems to work, though you have to extract the CSSStyleDeclaration first, like I do above. In the context of my example: Deckgrid.prototype.$$getLayout = function $$getLayout () {
var styles = $window.getComputedStyle(this.$$elem, ':before'),
layout, content;
styles = $.extend(true,{},styles);
content = styles.content; As far as I can see though, this workaround is dependent on having a full jQuery available. I don't think the jQuery Lite that comes with Angular includes |
@praabjerg workaround successfully corrects the issue. Thanks! |
yo! It worked...Thanks! |
Here is some additional info: @praabjerg Thanks for the fix. |
a client reminded me of a page not rendering.
when looking further it showed that Chrome, FF etc were working fine.
I found out that it had to do with the initialization of the content variable.
before parsing the content var I added a console.log(content) and suddenly the page came to life (weird!!!). Because I didn't want to leave the console.log in the code I added this:
this hack magically works so I hope others will benefit from it.
Better solutions are welcome :-)
The text was updated successfully, but these errors were encountered: