c9 / core

Cloud9 Core - Part of the Cloud9 SDK for Plugin Development https://c9.github.io/core/ https://c9.io
Other
2.56k stars 921 forks source link

fixed console resizing bug #522

Closed kzidane closed 6 years ago

kzidane commented 6 years ago

Issue #, if available: When resizing console, maximizing it, then minimizing it again, the draggable bar is no longer at the correct height so trying to resize the console by dragging the bar no longer works. (See the gif below!) This happens because container.height becomes a string that represents the percentage height (e.g., "50%") and later Math.max is called with an integer and that string, returning NaN to which the container's height is incorrectly set.

console

Description of changes: This PR uses the container's offsetHeight instead.

cc @danallan @nightwing

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

kzidane commented 6 years ago

cc @dmalan @brianyu28