Skip to content

iOS: make showSideMenu effective — disable left-edge slider swipe (and optionally About SEB) for kiosk deployments #640

Description

@adrimg3196

Is your feature request related to a problem? Please describe.
On iOS/iPadOS, when SEB runs as a kiosk browser under MDM App Lock (Single App Mode) with the Dock hidden (showTaskBar: false) and the toolbar hidden, the left slider menu can still be opened by swiping right from the left screen edge. In a public-facing kiosk (self check-in, digital signage with a form, lobby tablets) visitors discover the gesture and get a menu with About SEB, Reload Page and Quit Session. None of it is harmful when allowQuit is false, but it breaks the "locked web app" experience and generates support calls.

There is no managed-configuration key that disables the gesture:

  • showSideMenu is declared in SEBSettings.m (default YES) and bound to a checkbox in the macOS PreferencesAppearance.xib, but nothing reads it at runtime on iOS (or macOS) — setting it to false via MDM managed app configuration has no effect.
  • The gesture is fixed in SEB/Base.lproj/Main.storyboard (LGSideMenuController, swipeGestureArea = 0 → borders, default leftViewSwipeGestureEnabled = YES) and never touched from code.
  • The About SEB slider item is added unconditionally in SEBUIController.m (// Add About SEB command to slider items), so it cannot be removed either.

Verified against main @ a1e3f78 (3.7.1).

Describe the solution you'd like
Make the existing showSideMenu key effective on iOS:

  1. In SEBViewController.m, where the UI is (re)initialized (initSEBUIWithCompletionBlock:temporary:), read the key and apply it:
BOOL showSideMenu = [preferences secureBoolForKey:@"org_safeexambrowser_SEB_showSideMenu"];
self.sideMenuController.leftViewSwipeGestureEnabled = showSideMenu;
  1. In SEBUIController.m, skip adding the SEB icon (leftDrawerButtonPress:) to the Dock when showSideMenu is false, and no-op leftDrawerKeyShortcutPress: (Cmd-M) in that case.

  2. Optionally gate the About SEB slider item behind the same key or a small new key (e.g. showAboutSEBMenuItem, default YES), so a kiosk deployment can leave only Reload Page.

showSideMenu already exists in the defaults table and in the config-key reference, so this needs no new key and no schema change — it just gives the key the behaviour its name promises. Default YES keeps every existing config unchanged.

Happy to submit a PR for 1 and 2 if you'd accept it.

Describe alternatives you've considered

  • Reducing the menu contents via managed config (allowFind, enableZoomPage, enableScrollLock, allowBrowsingBackForward, newBrowserWindowNavigation, showSettingsInApp, mobileAllowQRCodeConfig all false). That gets the menu down to Reload Page / About SEB / Quit Session (a no-op with allowQuit: false), but the panel itself still opens.
  • Blocking the gesture from the web page (touch-action, preventDefault on touchstart). Not possible: the pan recognizer lives on the native container, the WKWebView content cannot cancel it.
  • Enabling the browser toolbar / Dock to move commands out of the slider. Doesn't remove the slider.

Additional context
Deployment: supervised iPads, MDM App Lock on org.safeexambrowser.ios.seb, SEB configured via MDM managed app configuration (no .seb file), hotel self check-in web app. Relevant config excerpt:

{
  "hideBrowserWindowToolbar": true,
  "showTaskBar": false,
  "showSideMenu": false,
  "showNavigationButtons": false,
  "allowQuit": false,
  "browserWindowAllowReload": true
}

With this config the left-edge swipe still opens the slider showing Reload Page, About SEB, Quit Session.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions