### Bug description

I want to [cross-reference to tables](https://quarto.org/docs/authoring/cross-references.html#tables) that are inside a tabset panel. It turns out that only if the table being referenced is _in the tab that is currently visible_, the cross-ref link would work. By contrast, if the cross-ref link refers to the table that is in the non-visible tab, then clicking the link doesn't do anything.

**`.qmd` file**

<pre>
---
title: "cross-refs to inside-tabset-panel-tables work only if those tables are already visible"
format: html
---

::: {.panel-tabset}

## iris
```{r}
#| label: tbl-iris
#| tbl-cap: Iris

knitr::kable(head(iris))
```

## mtcars
```{r}
#| label: tbl-mtcars
#| tbl-cap: Mtcars

knitr::kable(head(mtcars))
```

:::

---
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
## content; keep scrolling down
Here I want to refer to `mtcars` table from above: @tbl-mtcars
However, clicking on this cross-ref link would work only if _mtcars_ tab is already selected and visible up there.
Otherwise, if _iris_ tab is displayed above, then clicking on _mtcars_ cross-ref link here won't do anything.

</pre>

------

- Quarto version: `1.2.269`
- RStudio version: `2022.07.2+576 Spotted Wakerobin (desktop)`

<details>
  <summary>Session Info</summary>

  ``` r
  sessioninfo::session_info()
  #> - Session info ---------------------------------------------------------------
  #>  setting  value
  #>  version  R version 4.2.2 (2022-10-31 ucrt)
  #>  os       Windows 8.1 x64 (build 9600)
  #>  system   x86_64, mingw32
  #>  ui       RTerm
  #>  language (EN)
  #>  collate  English_United States.1252
  #>  ctype    English_United States.1252
  #>  tz       Asia/Jerusalem
  #>  date     2022-12-03
  #>  pandoc   2.19.2 @ C:/Program Files/RStudio/bin/quarto/bin/tools/ (via rmarkdown)
  #> 
  #> - Packages -------------------------------------------------------------------
  #>  package     * version date (UTC) lib source
  #>  cli           3.4.1   2022-09-23 [1] CRAN (R 4.2.1)
  #>  digest        0.6.30  2022-10-18 [1] CRAN (R 4.2.1)
  #>  evaluate      0.18    2022-11-07 [1] CRAN (R 4.2.2)
  #>  fastmap       1.1.0   2021-01-25 [1] CRAN (R 4.2.2)
  #>  fs            1.5.2   2021-12-08 [1] CRAN (R 4.2.2)
  #>  glue          1.6.2   2022-02-24 [1] CRAN (R 4.2.1)
  #>  highr         0.9     2021-04-16 [1] CRAN (R 4.2.2)
  #>  htmltools     0.5.3   2022-07-18 [1] CRAN (R 4.2.1)
  #>  knitr         1.40    2022-08-24 [1] CRAN (R 4.2.1)
  #>  lifecycle     1.0.3   2022-10-07 [1] CRAN (R 4.2.1)
  #>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.2.1)
  #>  reprex        2.0.2   2022-08-17 [1] CRAN (R 4.2.1)
  #>  rlang         1.0.6   2022-09-24 [1] CRAN (R 4.2.1)
  #>  rmarkdown     2.18    2022-11-09 [1] CRAN (R 4.2.2)
  #>  rstudioapi    0.14    2022-08-22 [1] CRAN (R 4.2.1)
  #>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.2.2)
  #>  stringi       1.7.8   2022-07-11 [1] CRAN (R 4.2.1)
  #>  stringr       1.4.1   2022-08-20 [1] CRAN (R 4.2.1)
  #>  withr         2.5.0   2022-03-03 [1] CRAN (R 4.2.1)
  #>  xfun          0.34    2022-10-18 [1] CRAN (R 4.2.2)
  #>  yaml          2.3.6   2022-10-18 [1] CRAN (R 4.2.1)
  #> 
  #>  [1] C:/Program Files/R/my_packages
  #>  [2] C:/Program Files/R/R-4.2.2/library
  #> 
  #> ------------------------------------------------------------------------------
  ```



</details>


cscheid
2022-12-03T14:57:11Z
emmansh
bug needs-repro crossref
v1.3
closed
Table cross-refs don't work when referring to tables in non-visible tabs (in tabset panel)
https://github.com/quarto-dev/quarto-cli/issues/3557