How to turn off autofocus on Azure B2C Sign In page

Jan Borowiak 55 Reputation points
2023-03-20T14:32:51.7566667+00:00

It seems like the content served by Azure B2C for Sign In has "autofocus" property set on some html element. It causes my web page to scroll down on small screens (e.g. on mobile).

<button class="accountButton firstButton claims-provider-selection" id="ABC" role="link" autofocus>Employee Sign In</button>

Is there a way to disable this "autofocus" on policy level?

PS. I know it could be handled using custom javascript, but e.g. scrolling to the top not always work.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2023-03-21T21:48:02.7833333+00:00

    Hi @Jan Borowiak , the closest thing that we have for this are UI Templates, but unfortunately nothing built-in for autofocus on the policy level. You'd have to use JavaScript for this. If you're interested in learning how to do this I can help you! Please let me know if you have any questions.

    If this answer helped you please mark it as "Verified" so other users can reference it.

    Thank you,

    James


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.