-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Angular-ui is throwing csp error on uib-popover #5470
Comments
@apryce, quick question, are you including the UIBS CSP CSS file in your |
This is caused by the inline style present in bootstrap/src/tooltip/tooltip.js Line 134 in 48c9cd8
|
@icfantv, we are using ui-bootstrap-csp.css and angular-csp.css. |
Actually that looks like the similar to ng-hide class. Maybe rather than using inline style we can use that class? |
I think it is sufficient to just turn that CSS into a class - the service is also doing some style modifications with positional calculations and such, it may disrupt the calculations to switch to ng-hide/ng-show, and also would require a $digest to run. The positional changes are done outside the $digest cycle. |
@apryce, i can't speak to your last question, but if you look at the carousel component, for example, you will see it has a separate CSS file. I think the grunt task will just magically suck it in and do what it needs to do - i.e., putting it in the distribution file. If you look at the bottom of the uncompressed TPLS version of our file, you will see how it gets injected/loaded. |
I'm looking at getting a PR put together and approved. My estimate is that it will be at least a few weeks to cut the red tape. If anyone is going to jump in sooner, be sure to comment here. Thanks. |
We're probably going to look at this being done within the next few days so it can get in 1.2. |
Oh, sweet! Thanks! |
We were getting two inline errors. If the person fixing wouldn't mind doing a search inline that would be great. |
Is it two errors from purely the tooltip? I'm not finding any other inline styles. |
I think it was, but I didn't have a chance to dive into it. If you've done a search for inline then that's all I intended. |
Yup, I only found one |
Tooltip and position - scrollbarWidth function are the only 2 inline instances I can find. I added a class to the datepicker that is kind of what we need, but it needs to be more generic. I'll create a PR that adds the implementation suggested in the ng-hide docs, something like:
That we should be able to use everywhere. |
Awesome! Thanks guys! |
We are seeing an inline style being applied when using uib-popover. We are using the ng-csp directive at the top level and that is stopping other inline styles. The error is happening in line 2760 of angular.js in version 1.4.9 (see tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];)
The console stack trace is:
The text was updated successfully, but these errors were encountered: