Skip to content

Conversation

@s-nie
Copy link
Contributor

@s-nie s-nie commented Jun 5, 2024

@s-nie s-nie changed the title Scroll Area: Prevent drag interaction outside the area ScrollArea: Prevent drag interaction outside the area Jun 5, 2024
@emilk emilk added bug Something is broken egui labels Jun 5, 2024
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it, and it creates a bunch of bugs.

Try clicking around on the right side panel in the egui demo app, for instance.

I think the problem is that the late interact call means the interaction is on top of the contents, while it should be below. So my idea wasn't great.

Better to store the final size for the next frame afterall

@s-nie
Copy link
Contributor Author

s-nie commented Jun 5, 2024

I think the problem is that the late interact call means the interaction is on top of the contents, while it should be below.

Right, I had not considered this. I changed the approach in 4e1ea29, now the demo app works fine for me.

@s-nie s-nie requested a review from emilk June 6, 2024 07:48
@emilk emilk merged commit 1f008fb into emilk:master Jun 6, 2024
@emilk
Copy link
Owner

emilk commented Jun 6, 2024

Thanks!

@s-nie s-nie deleted the 4349-scroll-area-drag-fix branch June 6, 2024 13:37
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* Closes emilk#4349
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Window contents can sometimes be affected by mouse interaction outside the window

2 participants