Skip to content

Only apply cursor style to the <canvas>#8036

Merged
emilk merged 1 commit intoemilk:mainfrom
mkeeter:canvas-cursor-style
Mar 27, 2026
Merged

Only apply cursor style to the <canvas>#8036
emilk merged 1 commit intoemilk:mainfrom
mkeeter:canvas-cursor-style

Conversation

@mkeeter
Copy link
Copy Markdown
Contributor

@mkeeter mkeeter commented Mar 26, 2026

This improves cases where the canvas does not cover the full screen, which was a goal in release 0.28.0.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Preview available at https://egui-pr-preview.github.io/pr/8036-canvas-cursor-style
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

@mkeeter mkeeter marked this pull request as ready for review March 26, 2026 23:03
@emilk emilk added web Related to running Egui on the web eframe Relates to epi and eframe bug Something is broken labels Mar 27, 2026
@emilk emilk merged commit f325097 into emilk:main Mar 27, 2026
28 of 29 checks passed
@emilk emilk changed the title Only apply cursor style to the <canvas> Only apply cursor style to the <canvas> Mar 27, 2026
Masterchef365 pushed a commit to Masterchef365/egui that referenced this pull request Apr 3, 2026
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/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 test and 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!
-->

This improves cases where the canvas does not cover the full screen,
which was a goal in [release
0.28.0](https://github.com/emilk/egui/releases/tag/0.28.0).

* Closes <emilk#8035>
* [X] I have followed the instructions in the PR template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken eframe Relates to epi and eframe web Related to running Egui on the web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting cursor on web applies to <body>, not <canvas>

2 participants