v-spacing disappears when navigating between pages in Firefox

Very strange behavior occurs with our Vaadin Liferay portlet appearance in Firefox. I have a portlet which contains a horizontal layout with 2 labels inside. The portlet has setSpacing(true).
When I set setSpacing(true), when the html is generated, Vaadin inserts a spacing between 2 labels (

). Problem is that when I click on any link in my webpage, and the page is going to redirect by that link, the spacer div, which separates 2 labels, magically disappears. But when the page is redirected to a new link, these spacers are visible again.
This disappearance during the navigation makes an effect of “dancing” layout when the spacer is removed. I’ve attached 2 images:

  1. spacing_png shows the initial appearance of the portlet
  2. spacing_result.png shows the appearance, when I click a link on the page (the spacer disappears).

Does anyone have suggestions what might be the problem and which way to look for?
Thanks in advance.
13386.png
13387.png

Problem is with html rendering by FF

<div class="v-spacing"></div>

that is generated by setting setSpacing(true)

It ignores the empty div in a particular moment, when the html is being reloaded. It renders fine if I put something inside the tag

<div class="v-spacing"> </div>
or
<div class="v-spacing"><!-- anything --></div>

Is there a way to adjust the generation of

html?

Hi,

Thanks for degugging that for me. I’ve seen that behavior many times (every time you reload a page), but never thought more about the actual cause of it.

But as a simple comment block will suffice, I guess that could be added to the core. You would need to modify the
Slot.setSpacing(boolean)
method on client side code.

Please
create a ticket
about this.

Any news on this one?


https://dev.vaadin.com/ticket/20414