bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Dialog: Line break in templateUrl with IE7/8

Open enkelmedia opened this issue 13 years ago • 2 comments

When I was setting up a dialog like this everything worked fine in IE9, Chrome and FF but in IE7+8 i got an strange error just saying "[object Error]undefined " to the log.

This code is used:

$scope.opts = { ... templateUrl: '/CreateNewTripView.html', controller: 'TestDialogController' };

$scope.openDialog = function () {

    var d = $dialog.dialog($scope.opts);
    d.open();

}

After trying to remove all code from CreateNewTripView and its controller i added just a H3 and it worked. BUT. When i added a linebreak before the h3 in crashed in ie7+8.

So if the first line in the template is a line break it will crash.

enkelmedia avatar Apr 16 '13 12:04 enkelmedia

I've got an impression that this one will be fixed by https://github.com/angular-ui/bootstrap/pull/339

pkozlowski-opensource avatar Apr 21 '13 17:04 pkozlowski-opensource

@pkozlowski-opensource Correct. I've tested this issue before/after the fix on #339 and can confirm that this was the same culprit. IE7/8 seems to add a text-node for the new line.

jonbcard avatar Apr 22 '13 23:04 jonbcard