We have recently upgraded to JSF version 2.3. After that, this unknown space issue is there in the interface where we use Primefaces layouts. In my scenario, this issue is automatically getting fixed for the following options:
- When refresh the page (F5) without clearing cache (Ctrl+F5).
- When browser window is resized.
I have tried many solutions for resizing the window using JavaScript to the same size, but Chrome and Opera latest versions does not support that feature.
Therefore, I found a solution with the above first option. You can refresh the page only once using JavaScript as explained below:
window.onload = function() {
if(!window.location.hash) {
window.location = window.location + '#home';
window.location.reload();
}
}
Edit 1:
And if one reload is not enough, try the following code
window.onload = function() {
if(!window.location.hash) {
window.location = window.location + '#home';
window.location.reload();
} else if (window.location.hash == '#home') {
window.location = window.location + '#home2';
window.location.reload();
}
}
Edit 2:
Finally this problem is solved by internal styling instead of external styling. The reason was because the styles in external style sheets were not applied in the very first renderings.