Open vbabenko opened 7 years ago
For this problem, I think this solution cannot solve the real problem, because this component will find a error scroll wrapper if the real parent is a invisible iframe
in the Firefox browser, it just prevent the error be thrown, the developers and users may don't understand why the program cannot work properly and there is no error, so I don't think it's a effective solution.
Perhaps we can control the component render through the v-if
directive, we can render this component when the iframe is visible, how do you think about it?
@PeachScript the problem here is that window.getComputedStyle
returns null for FireFox inside iframe even when iframe is visible... So, v-if will not help, and there is no way to fix (just some UI work around for FF like a button where a user can click and load more).
I do not know if possible to use something differ instead of window
...
Let me double check how it behaves for opened iframe. I will post result soon
I see, maybe the force-use-infinite-wrapper
attribute can help you, details in here.
Oh, I found that you were also one of the participants in that issue, is this way useless?
I tested with v-if
but the issue is reproducible. It throws exception TypeError: getComputedStyle(...) is null
. So, no matter if content id hidden in iFrame or shown.
I did not try force-use-infinite-wrapper
attr yet. When I have result, I will post my status here
@vbabenko got it, thanks!
Version
@PeachScript, Could you please take a look on closed Pull request #74? Sorry for delay, I've provided answers on your questions. Is it possible to have fix in upcoming version?
Vue.js version
2.2.0
What is expected?
Add simple check that will not throw exception for
getScrollParent
methodWhat is actually happening?
When infinite-loading used in iFrame and for FireFox browser it throws expection Original FF issue https://bugzilla.mozilla.org/show_bug.cgi?id=548397
How to reproduce this problem?
I am using KeenUi Modal component that contains iframe with huge list of items. When page is rendered Modal component initialized and infiniteScrolling is triggered (but modal was not actualy opened). And in this situation infinite loading throws exception for FireFox browser due to their issue - getComputedStyle returns null for iframe