-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button doesn't react on first click due internal exception #19171
Comments
There is a try catch around. We run a feature detection. This is expected. You can disable the stop on all exceptions of Chrome Dev Tools. I'm curious, what's the version of your browser? |
I have checked, we are all good:
cc @eps1lon as you might enjoy this issue (for curiosity). |
@oliviertassinari , thank you. I put on this check box only for detecting the issue. The problem that "button doesn't fire "submit" within form on first click", doesn't matter debugger is on or off. Is it clear? It appears in Chrome/Firefox/Safari. I guess it something connected to that exception |
@skynet-core Notice the default value of the |
This comment has been minimized.
This comment has been minimized.
Either they changed it or I didn't look quite right. But I do explain in the very next line what is happening. The only issue is that it states that a Apparently this is misleading in case you break on every exception (not just uncaught). Since this kind of debugging is usually exploratory (from my experience) any comment that is slightly off can be very confusing. I'll check again what type of error should be thrown. |
@eps1lon thank you a lot. Actually my problem isn't exception within debugger. I added it just to show you because I thought it could help. The problem is that BUTTON with type="submit" doesn't submit form on first click. But simple html |
@eps1lon Oh wow 🔍! On my side, Firefox: SyntaxError, Safari: SyntaxError, Chrome: DOMException 🤷♂️, Spec: SyntaxError. |
@skynet-core This is very likely a support request, please ask on StackOverflow (What's the probability for having a form submission bug in a framework used by hundreds of thousands of developers each month and having only surface it now?). Also, note that if you do ask there, people won't be able to help you without a reproduction (codesandbox is a great tool for that). |
This is better asked on StackOverflow. Adding the complete code (with a codesandbox) will accelerate the response time.
Very likely not worth it.
To be fair a DOMException makes more sense if you refer to SyntaxError on MDN that defines it as an error that is thrown when the parser encounters code that isn't valid JS. This is invalid CSS though. ES spec does not tie SyntaxError to JS. Just states that
which does apply. Either way it's a good reminder that catching specific errors can be problematic since browsers might not throw the correct one. |
I am using this library in one simple POC project. May be it is related to typescript compiling, but will be grateful for any help.
Lib version:
Here is an example of code:
Here is an screenshot of an error
File where error occurs
@material-ui/core/esm/utils/focusVisible.js
Function
isFocusVisible
Additional information. After second click on button it works fine.
The text was updated successfully, but these errors were encountered: