enterprise: Homepages: homepage.js isn't returning a correct height.

Describe the bug The homepage component element doesn’t have a height set on it.

To Reproduce Steps to reproduce the behavior:

  1. Go to http://master-enterprise.demo.design.infor.com/components/homepage/example-hero-widget.html
  2. In devtools highlight the div.homepage element.
  3. make overflow: auto as an element style
  4. See incorrect height

Expected behavior Want to see the height correctly set for the homepage element give it’s home page tiles current layout.

Version

  • ids-enterprise: v4.19

Screenshots image

Notice when I set overflow to auto it shows the home page’s true height.

Platform

  • OS Version: Windows 10
  • Browser Name chrome
  • Browser Version Version 75.0.3770.100 (Official Build) (64-bit)

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

Yes, I think we can make a sample that shows how we are using it. And we should be able to have full-page scrolling and sticky tabs in the sample like landmark has.

@deep7102 noted that it might work to use:

$('.homepage').on('resize', function() {
  console.log({
    width: this.scrollWidth,
    height: this.scrollHeight
  });
});

But then you also need to set that after doing the component init. As a possible workaround.

We need to put a bit more work into this issue to call it “done”. See this comment on #2521.

CSS alone isn’t enough to get the container height properly defined, since all the Homepage Widgets are absolutely positioned and there are no other elements inside the container to govern the height.

My guess is we augment what’s in resize() to somehow calculate the rows of blocks and store the container height.

We want this for full-page scrolling. The issue is we want to make tabs sticky to the top as they move up. But if there is a homepage below the tabs it causes the tabs to shift up and out of view.