I3wm mark and jump

I’m trying to apply a mark whenever I open Firefox, then define a key to focus it.

bindsym $mod+b				exec firefox, mark browser

bindsym $mod+apostrophe    mode "jump"
mode "jump" {
    bindsym $mod+b    [con_mark="browser"] focus
    bindsym Escape			mode "default"
}

That’s not working. I also tried “exec firefox mark browser” and “exec firefox; mark browser” to no avail. What am I missing?

EDIT: I just realized i3 is marking my current focused window, not the Firefox one I just opened.

Apply a command criteria to the mark command. This will mark the firefox window you just opened. E.g:

bindsym $mod+b exec firefox; [class="firefox"] mark browser

If you just want to switch to a browser window with a keybinding, I really don’t see why you want to use marks. It’s easier and a lot more straightforward to just use the WM_CLASS property. For example,

bindsym $mod+apostrophe    mode "jump"
mode "jump" {
    bindsym $mod+b    [class="firefox"] focus
    bindsym Escape			mode "default"
}

I specifically have a Firefox window for work stuff that I need to open and treat separately, like:

bindsym $mod+$sft+b			exec firefox --no-remote -P default --class myclass https://whatever

So I want to differentiate between that one and my regular firefox session. The same applies to two other apps.