Formatting a button to a new size doesn't necessarily change its width and height properties
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Formatting a button to a new size doesn't necessarily change its width and height properties
Code example here: https://editor.p5js.org/Jstodd/sketches/klBXzGjCA
Try clicking the button in this example. If you are too far to the right, it will not click. Why? I styled the size, and i called the width and height, so why doesn't it work as expected?
Image of bug here:

I am using Ubunto 20.04 LTS Linux, and Brave Browser (Version 1.33.106 Chromium: 96.0.4664.110 (Official Build) (64-bit))
My browser settings are normal, no strict mode or anything. And generally Brave should run smooth like Chrome because its chromium based and kept up-to-date.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the linked p5.js Web Editor sketch and reproduce the button-sizing and click-area mismatch described in the issue. Trace how the styled size relates to the button's reported width and height, then verify that clicking across the displayed button works as expected without changing the reported dimensions incorrectly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100