Skip to content

Commit

Permalink
Fix Bug view options menu (#6697)
Browse files Browse the repository at this point in the history
#### Description

This PR fixes bug described here : #4448 

I set a max-height property and a scroll in case of overflow on the
y-axis.

#### Checklist

 - [x] I have updated tests where applicable.
 - [x] I have added an entry to the CHANGELOG.

---------

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
  • Loading branch information
lups2000 and mhils committed Mar 6, 2024
1 parent a91989b commit a128672
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
([#6692](https://github.com/mitmproxy/mitmproxy/pull/6692), @errorxyz)
* Allow runtime modifications of HTTP flow filters for server replays
([#6695](https://github.com/mitmproxy/mitmproxy/pull/6695), @errorxyz)
* Fix bug view options menu in case of overflow
([#6697](https://github.com/mitmproxy/mitmproxy/pull/6697), @lups2000)
* Allow --allow-hosts and --ignore-hosts to work together
([#6711](https://github.com/mitmproxy/mitmproxy/pull/6711), @dstd)

Expand Down
3 changes: 3 additions & 0 deletions web/src/css/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
> li > a {
padding: 3px 10px;
}

max-height: 250px;
overflow-y: scroll;
}
2 changes: 1 addition & 1 deletion web/src/js/components/contentviews/ViewSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function ViewSelector({ value, onChange }: ViewSelectorProps) {
<Dropdown
text={inner}
className="btn btn-default btn-xs"
options={{ placement: "top-start" }}
options={{ placement: "top-end" }}
>
{contentViews.map((name) => (
<MenuItem key={name} onClick={() => onChange(name)}>
Expand Down

0 comments on commit a128672

Please sign in to comment.