mui / mui/material-ui

[Switch] onBlur not working for mobile devices

Open
#35,841 4 comments 0 reactions 1 assignee View on GitHub

@mnajdova is already working on this.

Since Jan 16, 2023.

browser: Safari scope: switch
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/elated-sanderson-frv36i?file=/src/App.tsx

Steps:

  1. Open link on any Ipad or Iphone
  2. Open console in codesandbox
  3. Tap Switch
Current behavior 😯

There should be log in console "onBlur fired" but there isn't one.

Expected behavior 🤔

You should see logged text in console

Context 🔦

Usually throughout our app we use onChange for handling local state and onBlur for calling api for saving data.
My question is it a bug or it is expected behavior and we need to find another workaround for handling saving data

Your environment 🌎

No response

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.