Skip to content

Commit

Permalink
Fix filter tree filter text box width
Browse files Browse the repository at this point in the history
Use box-sizing: border-box setting so that the provided width includes
the filter text box padding and border.

Use the reference element's right position as provided width so that it
can include the reference element's left margin.

Signed-off-by: Patrick Tasse <[email protected]>
  • Loading branch information
PatrickTasse committed Nov 1, 2024
1 parent 0ae1fd4 commit f2e1910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class Filter extends React.Component<FilterProps, FilterState> {
};
this.resizeObserver = new ResizeObserver(entries => {
this.setState({
width: entries[0].contentRect.width
width: entries[0].contentRect.right
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ canvas {
padding: 3px;
margin-bottom: 5px;
text-indent: 23px;
box-sizing: border-box;
color: var(--trace-viewer-input-placeholder-foreground);
}

Expand Down

0 comments on commit f2e1910

Please sign in to comment.