bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Button web example on bevyengine.org clickable area is wrong (Regression?)

Open paul-hansen opened this issue 2 years ago • 8 comments

Bevy version

Whatever the examples are built with on the webpage: https://bevyengine.org/examples/ui/button/ Is not happening for me locally using Bevy 0.7

System information

Chrome Version 102.0.5005.63 (Official Build) (64-bit) on Windows 11

`AdapterInfo { name: "ANGLE (NVIDIA, NVIDIA GeForce RTX 3080 Direct3D11 vs_5_0 ps_5_0, D3D11)", vendor: 4318, device: 0, device_type: DiscreteGpu, backend: Gl }`

What you did

I opened https://bevyengine.org/examples/ui/button/ and tried clicking the button in the example.

What went wrong

The area that I can click the button is offset from the visual position of the button. It gets more offset (and maybe larger?) if the window is made smaller.

Additional information

Example:

https://user-images.githubusercontent.com/7019130/172485403-d792d1e0-337f-4f55-bed6-6fe9bc2b127d.mp4

I'm 90% sure this wasn't happening earlier today, so it might be something merged recently.

paul-hansen avatar Jun 07 '22 21:06 paul-hansen

I just tried pulling the main branch and running the example locally using cargo run --release --target wasm32-unknown-unknown --example button and it seems to be working correctly. Depending on what version the website uses, this may already be resolved.

paul-hansen avatar Jun 07 '22 21:06 paul-hansen

Yeah seems like @paul-hansen is right. I'm seeing this same issue on the examples webpage (on firefox too, so a totally different browser), but not if i compile the lastest bevy example locally.

benbot avatar Jun 08 '22 14:06 benbot

Depending on what version the website uses, this may already be resolved.

The website is using the last released version, 0.7 here

mockersf avatar Jun 08 '22 15:06 mockersf

This looks like it might be a duplicate of https://github.com/bevyengine/bevy-website/issues/371 and should have been fixed by https://github.com/bevyengine/bevy/pull/4726.

hymm avatar Jun 08 '22 16:06 hymm

I agree that looks like the same thing and looks to be fixed in main now. Thanks for tracking that down 👍

I'll close this for now, feel free to reopen or anything though if you think something should be done before 0.8 releases.

paul-hansen avatar Jun 08 '22 19:06 paul-hansen

#4726 probably didn't fix this as it's an optional behaviour that is not enabled by default

mockersf avatar Jun 08 '22 21:06 mockersf

Reopened as we have a fresh reproduction.

alice-i-cecile avatar Aug 02 '22 20:08 alice-i-cecile

issue is on the CSS of the website changing the size of the canvas, I opened https://github.com/bevyengine/bevy-website/pull/429 to change that

mockersf avatar Aug 02 '22 22:08 mockersf