Details
-
Bug
-
Resolution: Fixed
-
High
-
2.2.3, 2.3.2
-
None
Description
The customer uses 3rd party JS plugins. One of them tries to measure window width to set proper with of slider's element. It tries to do so on jQuery's $(document).ready() event, but in that time iframe's display value is still set to none. Therefore window.outerWidth (as well as outerHeight is set to 0. The side effect is, that 3rd party plugin sets elements size to 0px what breaks customer's blocks.
Steps to reproduce
There is no easy way to do so. The simplified way is to:
- Create own block
- In the block template add the following JS snippet:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"> <script> $(document).ready(function (e) { console.log($(window).width()); }); </script>
- Create a LandingPage
- Add the new block of previously created type
- Go to preview mode
- You should see the proper width in the browser's console
- Go to edit mode
- You should see 0 width in the browser's console
Proposed solution:
Since iframe is below spinner's layer, it's display CSS property can be easily changed to block.