microsoft-authentication-library-for-android icon indicating copy to clipboard operation
microsoft-authentication-library-for-android copied to clipboard

Webview ignores actionBar?.hide()

Open RichardToowoxx opened this issue 6 months ago • 3 comments

Describe the bug

When using enableEdgeToEdge() the webview ignores actionBar?.hide().

Smartphone:

  • Device: e.g. Medium Phone emulator (Android Studio)
  • Android Version: API 36.0, Android 16.0
  • Browser: Chrome
  • MSAL Version: 6.2.0

To Reproduce

Steps to reproduce the behavior:

  1. enable edge to edge
  2. disable the action bar
  3. use the webview

Expected behavior

The action bar should be hidden in the Microsoft login webview, too (like for the rest of the app & other webviews).

Actual Behavior

The action bar is not hidden and makes the content of the login webview partially unreadable.

Screenshots

Image

RichardToowoxx avatar Jul 24 '25 08:07 RichardToowoxx

@RichardToowoxx , do you have any broker app like Company Portal/Authenticator/Link To Windows installed on your device? We have fixed the issue in brokered flows (when the broker app is installed).

somalaya avatar Jul 24 '25 19:07 somalaya

@somalaya I don't have anything installed on the device, it's a plain, fresh Android emulator in Android Studio ("Medium Phone").

We use other libraries that open a webview, too, like KMPAuth and WebView for JetBrains Compose Multiplatform and for them no action bar is displayed when actionBar?.hide() is set in onCreate().

RichardToowoxx avatar Jul 25 '25 06:07 RichardToowoxx

I managed to work around it by adding a android:theme="@android:style/Theme.Material.NoActionBar" to <application> in my AndroidManifest.xml.

RichardToowoxx avatar Jul 28 '25 11:07 RichardToowoxx