Skip to content

Block Popups setting ignored on launch #45569

@kylehickinson

Description

@kylehickinson

Description

The "Block Popups" setting found in General does not work correctly as it is reset/ignored when creating the initial WKWebViewConfigurations for each profile (javaScriptCanOpenWindowsAutomatically set to false explicitly after recreating WKPreferences)

configuration.preferences = WKPreferences()
configuration.preferences.javaScriptCanOpenWindowsAutomatically = false

These two lines should be removed

Steps to reproduce

  1. Visit a page that would automatically open a popup without user interaction

Actual result

Popup is always blocked

Expected result

Whether or not popup is opened should be based on the setting

Reproduces how often

Easily reproduced

Brave version

Broken for a super long time

Device/iOS version

n/a

Affected browser versions

  • latest AppStore
  • latest TestFlight
  • previous TestFlight

Reproducibility

  • with Brave Shields disabled
  • in the latest version of mobile Safari

Miscellaneous information

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions