Comments (4)
It seems that mobile browsers have a different approach to handling focus and blur events, which is causing this inconsistent re-rendering behavior when you click a button while still typing in the input field. A simple yet effective fix is to use setTimeout to briefly delay the onClick event, allowing the re-rendering to complete before the event is triggered. This ensures a seamless user experience across all devices.
from react.
Thanks for the suggestion, but using setTimeout is a workaround which doesn't feel like a good solution to this problem. While it might temporarily address the re-rendering issue, it introduces a delay in the user experience and relies on an arbitrary timeout value.
Ideally, we need to figure out why React's handling of focus and blur events differs between desktop and mobile Safari and find a way to ensure consistent behavior across all platforms. There seems to be a similar issue reported in the Preact project (preactjs/preact#3792) which has been resolved.
from react.
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
from react.
bump
from react.
Related Issues (20)
- Bug: Hydration Gaps and Dropped Events in Concurrent and Suspense Hydration
- Bug: Inconsistent enhanced error messages for incorrect hook calls
- Bug: Ensure createRoot warning parity with ReactDOM.render
- Bug: Fix Buffer - Write Chunks to Separate Buffers HOT 1
- Title Producer Retry Logic Fails to Handle Specific Retriable Exceptions in High-Throughput Environments
- Bug:
- Bug:
- Title Unnecessary updates to defaultValue and checked properties in <textarea> and <input> elements
- Bug: Update While Suspended Fails to Interrupt
- Bug:
- Bug:
- Bug:
- Bug:
- Bug:
- Bug: Bug in rerenderOptimistic: Incorrect currentHook check before updateWorkInProgressHook invocation
- [Compiler Bug]: Incorrect Optimization of JS Output
- Bug: Capture React.startTransition errors and pass to reportError
- Bug:
- [DevTools Bug]: Support Iterables in React DevTools
- Clarify Behavior of useSyncExternalStore When Using Server-Side Rendering (SSR)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.