Client: Confirm: CreateUser: fix empty oAuth window

This commit is contained in:
Viktor Fomin 2023-04-06 12:41:56 +03:00
parent 8915a09bce
commit 08381a38c1

View File

@ -287,8 +287,15 @@ const CreateUserForm = (props) => {
};
const onSocialButtonClick = useCallback((e) => {
const providerName = e.target.dataset.providername;
const url = e.target.dataset.url;
const { target } = e;
let targetElement = target;
if (!(targetElement instanceof HTMLButtonElement) && target.parentElement) {
targetElement = target.parentElement;
}
const providerName = targetElement.dataset.providername;
const url = targetElement.dataset.url || "";
try {
const tokenGetterWin = isDesktop