# User Main Menu Preferences newBrowserTab: false is ignored and still opens in a new browser tab

**URL:** <https://discourse.jupyter.org/t/user-main-menu-preferences-newbrowsertab-false-is-ignored-and-still-opens-in-a-new-browser-tab/28298>\
**Category:** JupyterLab\
**Tags:** jupyterlab, how-to, help-wanted\
**Created:** [September 12, 2024, 12:50am UTC](https://discourse.jupyter.org/t/user-main-menu-preferences-newbrowsertab-false-is-ignored-and-still-opens-in-a-new-browser-tab/28298 "2024-09-12T00:50:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aspergillusOryzae20](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/aspergillusoryzae20/32/16079_2.png) [@aspergillusOryzae20](https://discourse.jupyter.org/u/aspergillusOryzae20)\
**Post date:** [September 12, 2024, 12:50am UTC](https://discourse.jupyter.org/t/user-main-menu-preferences-newbrowsertab-false-is-ignored-and-still-opens-in-a-new-browser-tab/28298/1 "2024-09-12T00:50:43Z")

</div>

Using the suggestions made by @gutow in [this thread](https://discourse.jupyter.org/t/how-do-i-change-available-menus-in-the-mainmenu-bar/26322), I am finding that when I set `"newBrowserTab":"false"` the URL continues to open in a new window for both relative and absolute URLs. What is the criteria for making a URL open in the current window?

```auto
{
    "menus": [
        {
            "id": "jp-mainmenu-file",
            "items": [
                {
                    "disabled": true,
                    "command": "hub:control-panel",
                },                                
                {
                    "command": "help:open",
                    "rank": 99,
                    "args": {"text": "Go to relative path", "url":"/my/relative/path", "newBrowserTab":"false"}
                },
                {
                    "command": "help:open",
                    "rank": 100,
                    "args": {"text": "Gutow Homesite absolute path", "url":"https://cms.gutow.uwosh.edu/Gutow", "newBrowserTab":"false"}
                }
            ]
        }
    ]
}

```

[The related JupyterLab code](https://github.com/jupyterlab/jupyterlab/blob/c5f9b616704c2d83a0a08178a0f3525ff3f5b497/packages/help-extension/src/index.tsx#L248)

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [September 12, 2024, 9:35am UTC](https://discourse.jupyter.org/t/user-main-menu-preferences-newbrowsertab-false-is-ignored-and-still-opens-in-a-new-browser-tab/28298/2 "2024-09-12T09:35:38Z")

</div>

> [@aspergillusOryzae20](#):
>
> `"newBrowserTab":"false"`

I think you need to use `"newBrowserTab":false` (without quotes) as the “false” string is truthy.

---

<div class="post-metadata">

**Author:** ![aspergillusOryzae20](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/aspergillusoryzae20/32/16079_2.png) [@aspergillusOryzae20](https://discourse.jupyter.org/u/aspergillusOryzae20)\
**Post date:** [September 19, 2024, 6:21pm UTC](https://discourse.jupyter.org/t/user-main-menu-preferences-newbrowsertab-false-is-ignored-and-still-opens-in-a-new-browser-tab/28298/3 "2024-09-19T18:21:59Z")

</div>

Ah, 🤦‍♂️, thanks for that.

Updating it to `"newBrowserTab":false` makes a new tab open in the editor panel, and not as a widow.open() replacement for the current page.

 ![Screenshot 2024-09-19 at 11.32.24 AM](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/7/7c1d0bba417b2a0fb3fba0c8e1fadf42561492d7.png)

Would I need to override the [help-extension](https://github.com/jupyterlab/jupyterlab/blob/c5f9b616704c2d83a0a08178a0f3525ff3f5b497/packages/help-extension/src/index.tsx#L255) to allow for `window.open(url, target)` to use `target="_self"`?
