#joe-sca-3ds
1 messages ยท Page 1 of 1 (latest)
Unfortunately this isn't the right forum for this but that does seem weird
I can't do anything here, it's way too specific, but I can flag internally
can you DM me your account id and the email address you contacted support from?
I'm an admin on the server I work for Stripe
I will do, thank you very much
๐ @plucky sorrel
cc @vague totem who is the engineer on my team that was looking into this
thanks
Hello!
really appreciate the help
So I had a look at your support ticket and the videos really helped. I noticed in one of the videos that when someone clicked on the input field to enter their code it did get focus for a split second (the cursor entry bar appeared) but then focus was ~immediately stolen away by something else.
I had a look at your site and while the payment page is behind a login, I did notice you have some TrapFocus code there that I think may be responsible. It seems to be part of the Material components you're using, and seems to be used with modals. Are you using a modal to present the payment form or anything like that?
yes, i had noticed that it can initially be focussed
i am displaying a loading modal
the thing i find strange is that the. rest of the SCA auth is interactable
Can you share the code you're using to display that modal?
Also, to clarify, the issue is specifically with elements that want focus (like input fields), correct? Buttons and links can be clicked just fine?
If so, that would fit with what I suspect.
Clicks are fine, but sustained focus (which is required to input text) is being prevented.
yes, that's correct
i have a loading state
which when true
will display this
<Dialog open={showDialog} fullWidth>
<DialogContent classes={{ root: classes.root }}>
<Backdrop className={classes.backdrop} open={!!loading}>
<CircularProgress size={100} thickness={4} />
</Backdrop>
<Typography variant="h2">{title}</Typography>
<CircularProgress
size={100}
thickness={4}
className={classes.progress}
/>
<Typography variant="subtitle1">
Please do not refresh or press the back button
</Typography>
</DialogContent>
</Dialog>
Is this the Modal component you're using? https://mui.com/material-ui/react-modal/
import {
Dialog,
DialogContent,
Typography,
IconButton,
Backdrop,
CircularProgress,
} from '@material-ui/core';
Ah, okay, let me see...
"@material-ui/core": "^4.11.3",
Ah, yep, that Dialog component is based on the Modal.
A Dialog is a type of modal window that appears in front of app content to provide critical information or ask for a decision.
And then on the Modal page:
It properly manages focus; moving to the modal content, and keeping it there until the modal is closed.
Same thing there, it inherits from Modal: https://v4.mui.com/api/dialog/#inheritance
i see
And it looks like Modal steals focus by default: https://v4.mui.com/api/modal/
Looks like there's a disableAutoFocus there you might be able to use.
If true, the modal will not automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. This also works correctly with any modal children that have the disableAutoFocus prop.
Generally this should never be set to true as it makes the modal less accessible to assistive technologies, like screen readers.
i can't thank you enough for your help
Well, let's make sure this is it first!
it makes sense
i have a friend with a card that is repeatedly seeing this issue
That's the wrong property.
disableEnforceFocus
That's the one you want.
If true, the modal will not prevent focus from leaving the modal while open.
Generally this should never be set to true as it makes the modal less accessible to assistive technologies, like screen readers.
thank you - i will double check the focus
i will do an update and rebuild my system
i will then ask the friend to try again and report back
Let me know how it goes, I should be around for the next hour or so. I've turned on notifications for this thread. ๐
they will be asleep now
so I will ask them first thing. in the morning
but i will do the update and site rebuilds now
(uk time)
you can reply on the email thread we'll be on it too
Ah, okay. I'll grab your support email, reply to it, and follow up there.
we're just based on US hours
thanks again
Happy to help! I hope that solves it!