Bug 1431132 - Netmonitor list of requests height set to 100% to prevent overrides
MozReview-Commit-ID: BZAXGGDlxnQ
--- a/devtools/client/netmonitor/src/assets/styles/RequestList.css
+++ b/devtools/client/netmonitor/src/assets/styles/RequestList.css
@@ -61,16 +61,17 @@
width: 100%;
height: 100%;
}
.requests-list-contents {
display: table-row-group;
position: absolute;
width: 100%;
+ height: 100%;
overflow-x: hidden;
overflow-y: auto;
--timings-scale: 1;
--timings-rev-scale: 1;
}
.requests-list-column {
display: table-cell;
--- a/devtools/client/netmonitor/src/components/RequestListContent.js
+++ b/devtools/client/netmonitor/src/components/RequestListContent.js
@@ -109,29 +109,34 @@ class RequestListContent extends Compone
componentDidUpdate(prevProps) {
let node = this.refs.contentEl;
// Keep the list scrolled to bottom if a new row was added
if (this.shouldScrollBottom && node.scrollTop !== MAX_SCROLL_HEIGHT) {
// Using maximum scroll height rather than node.scrollHeight to avoid sync reflow.
node.scrollTop = MAX_SCROLL_HEIGHT;
}
+ this.onResize();
}
componentWillUnmount() {
this.refs.contentEl.removeEventListener("scroll", this.onScroll, true);
// Uninstall the tooltip event handler
this.tooltip.stopTogglingOnHover();
window.removeEventListener("resize", this.onResize);
}
onResize() {
- let parent = this.refs.contentEl.parentNode;
- this.refs.contentEl.style.height = parent.offsetHeight + "px";
+ //let parent = this.refs.contentEl.parentNode;
+ //this.refs.contentEl.style.height = parent.offsetHeight - 20 + "px";
+ }
+
+ componentWillReceiveProps() {
+ this.onResize();
}
isScrolledToBottom() {
const { contentEl } = this.refs;
const lastChildEl = contentEl.lastElementChild;
if (!lastChildEl) {
return false;