-
Couldn't load subscription status.
- Fork 6.7k
Update modal.js to handle backdrop issue in bootstrap 3.3.1 #3117
Conversation
To work with bootstrap 3.3.1. Ref angular-ui#2970
|
Waiting on a fix like this. |
|
+1 |
|
+1, waiting for this fix |
|
Temp. fix: |
|
+1 |
1 similar comment
|
+1 |
|
Any ETA? Thanks. |
|
@maxisam Can you add a comment above the |
|
I'm sorry but we can't merge this one as it assumes certain HTML structure of the backdrop template. We can't do this as people might want (and do) override default templates. |
|
@pkozlowski-opensource I thought about that too. But this project is for Bootstrap 3. It makes sense that we need to use modal-backdrop class in the template because it is in the original Bootstrap 3 and it is actually in the code not in the template. var angularBackgroundDomEl = angular.element('< div modal-backdrop >< /div >'); I do believe that we have different ways to resolve the issue, but I think it would require to change more than one line and one place. btw, I think all attempt fixes for this that achieved through css are not proper, since that will cause the issue that original BS team discovered, which was the reason they made this change. |
|
@maxisam we don't need to have one-liner fix. If a more generic solution requires more code so let it be. How about writing a dedicated directive that sets a height of a given element to |
|
We shouldn't be afraid of creating small, focused directives - ones that are doing one thing well, are easy to test etc. The advantage of this approach is that people then can compose those smaller primitives. |
|
@pkozlowski-opensource do you mean we create a directive invoked by the backdrop to set its height with the scrollHeight of modalwindow ? |
|
@allaire your fix doesn't work for me when the modal is invoked after scrolling down... It works fine with no scroll offset. UPDATE: Adding "position: fixed" to .modal-backdrop fixes this - quite literally! |
|
@kadamska : Just add this |
|
@harsh55: it works! 👍 |
|
Using this approach also @harsh55 👍 |
To work with bootstrap 3.3.1. Ref #2970