> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Popup Tips

> Troubleshoot Coinbase Wallet popup behavior and resolve common popup issues.

## Overview

When a Coinbase Wallet is connected and Coinbase Wallet SDK receives a request, it opens
[keys.coinbase.com](https://keys.coinbase.com/) in a popup window and passes the request to the popup for handling.
Keep the following points in mind when working with the Coinbase Wallet popup.

## Default Blocking Behavior

* Most modern browsers block all popups by default, unless they are triggered by a click.
* If a popup is blocked the browser shows a notification to the user, allowing them to manage popup settings.

### What to Do About It

* Ensure there is no additional logic between the button click and the request to open the Coinbase Wallet popup,
  as browsers might perceive the request as programmatically initiated.
* If logic is unavoidable, keep it minimal and test thoroughly in all supported browsers.

## `Cross-Origin-Opener-Policy`

If the Coinbase Wallet popup opens and displays an error or infinite spinner, it may be due to the dapp's `Cross-Origin-Opener-Policy`. Be sure to use a directive that allows the Coinbase Wallet popup to function.

* ✅ Allows Coinbase Wallet popup to function
  * `unsafe-none` (default)
  * `same-origin-allow-popups` (recommended)
* ❌ Breaks Coinbase Wallet popup
  * `same-origin`

For more detailed information refer to the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy).

## Coinbase Wallet Popup 'Linger' Behavior

* Sometimes a dapp may programmatically make a followup request based on the response to a previous request.
  Normally, browsers block these programmatic requests to open popups.
* To address this, after the Coinbase Wallet popup responds to a request, it will linger for 200ms to listen for another incoming request before closing.
  * If a request is received *during* this 200ms window, it will be received and handled within the same popup window.
  * If a request is received *after* the 200ms window and the popup has closed, opening the Coinbase Wallet popup will be blocked by the browser.
