processing / processing/p5.js

Formatting a button to a new size doesn't necessarily change its width and height properties

Open
#5,525 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
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:
buttonBug

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.