Material-ui: [Fab] Inconsistent click event behavior

Created on 10 Mar 2020  路  1Comment  路  Source: mui-org/material-ui

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

Props of a Fab component like "name" and "value" are often inaccessible when handling click events.

Expected Behavior 馃

Those props should always be accessible inside event.target.value and event.target.name.

Steps to Reproduce 馃暪

Codesandbox comparing the click event values for Fab, SpeedDialAction and button

(SpeedDialAction is included because it uses the Fab component and I had originally an issue with it).

This bug is quite odd... the events seem to register when clicking the bottom or top of a FAB but not anywhere else. Maybe it's an issue with the icons ?

Your Environment 馃寧

| Tech | Version |
| ----------- | ------- |
| Material-UI | v4.9.5 |
| React | 16.13.0 |
| Browser | Firefox and Chrome |

question

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

rbozan picture rbozan  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

ericraffin picture ericraffin  路  3Comments

anthony-dandrea picture anthony-dandrea  路  3Comments