How to turn off autofocus on Azure B2C Sign In page

Jan Borowiak 50 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 Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,447 questions
0 comments No comments
{count} votes

Accepted answer
  1. James Hamil 21,546 Reputation points Microsoft Employee
    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