material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Button on documentation page refreshes the page

Open Baribj opened this issue 2 years ago • 1 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

On https://mui.com/material-ui/react-text-field/ the search icon button right under:

Customization does not stop at CSS. You can use composition to build custom components and give your app a unique feel. Below is an example using the InputBase component, inspired by Google Maps.

Refreshes the page when clicked.

Expected behavior 🤔

Button to have e.preventDefault() or something

Steps to reproduce 🕹

No response

Context 🔦

No response

Your environment 🌎

No response

Baribj avatar Aug 08 '22 05:08 Baribj

@ritwaldev

The fix was actually simple, the type of IconButton was submit and when you click on those submit typed button, the page refreshes.

Just changed the type from submit to button fixed the problem.

PunitSoniME avatar Aug 08 '22 06:08 PunitSoniME