Closed massao closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
forma-36 | ✅ Ready (Inspect) | Visit Preview | Jun 12, 2024 2:57pm |
Latest commit: 02434c109423b775d03fdf42d08bf38d64ae38de
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
CommonJS | 135.8 KB (+0.01% 🔺) | 2.8 s (+0.01% 🔺) | 69 ms (+84.91% 🔺) | 2.8 s |
Module | 132.07 KB (+0.01% 🔺) | 2.7 s (+0.01% 🔺) | 80 ms (+70.61% 🔺) | 2.8 s |
This is a breaking change depending on how F36 users use the IconButton
today. Are we sure we want to release this as a patch
? Also, in theory, all events should bubble up, so this CSS shouldn't be necessary.
This is a breaking change depending on how F36 users use the
IconButton
today. Are we sure we want to release this as apatch
? Also, in theory, all events should bubble up, so this CSS shouldn't be necessary.
We could make the selector SVG specific, what is the main issue, maybe since SVG is a separate HTML object, what makes the event no bubble out from the SVG to the button, that belongs to another HTML object.
Purpose of PR
In some cases when using SVGs and other elements inside a button the event handler would consider them as being the target of the event, and not the button. By adding the
pointer-events: none
to the children, we make it so it consistently consider event target being the button.Also adding an onClick action on the storybook of button to be easier to check.
Before
https://github.com/contentful/forma-36/assets/1071799/d66e1e7c-bdf9-44fa-9009-88d3f8158915
After
https://github.com/contentful/forma-36/assets/1071799/416652cd-4bc1-4a1b-8de7-db6207c30bff