question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[beta] .challenges-instructions-panel div has static height

See original GitHub issue

Challenge Name

Beta challenges

Issue Description

The div .challenges-instructions-panel height is only changed when first loaded. This leads to two problems:

  1. Resizing the browser screen up. If the screen height increases, you get a scroll bar in the .challenges-instructions-panel div, and its height remains the same.
  2. Resizing the browser screen down. If the screen height reduces, you get a scroll bar in the body, and the .challenges-instructions-panel height remains the same.

This behavior only happens with the BETA.

Browser Information

Tested on both Chrome and Firefox on Windows 10 Desktop.

Screenshot

  1. Resizing it up image

  2. Resizing it down image

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
BerkeleyTruecommented, Feb 6, 2017

There are a couple of nested reasons for this.

The first layer: We determine the height of the challenge div at startup and disable auto updates because it is quite expensive to listen to scroll events.

The next layer down: We have to set a static height here because we want the challenge div to be no larger then the users window minus the height of the nav bar, which is a sticky nav bar.

This is largely a css issue that we throw some javascript on top of to patch up.

@QuincyLarson and I have discussed once or twice removing the sticky-ness of the navbar and making it scroll away with the rest of the page. This should solve this issue as we would no longer need to set a static height of the challenge window, we could give it height: 100%.

1reaction
uillianluizcommented, Jan 27, 2017

@leonfeng For one column this problem behaves differently from the cases I showed before, however if you open the windows like this: image

Then, you resize its height up, the screen will behave like this: image

While if you refresh the page with same height, it will behave like this: image

So it is basically because the height of the div is calculated on load, setting the inline style for height. In addition to that, the div .challenges-editor behaves in the same way, with an inline style setting a static height. You just need to play around, refreshing, resizing the screen and you will notice this behavior. While if you do this in the current FCC, it does not happen, the size changes on resize.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make Bootstrap Panel body with fixed height
To restrict the height to a fixed value you can use something like this. <div class="panel panel-primary"> <div ...
Read more >
Viewing online file analysis results for 'yahoo.php'
This report is generated from a file or URL submitted to this webservice on ... This report has 7 indicators that were mapped...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found