You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to remove a tag using the remove method I'm getting the following error. This error is not being raised when I'm trying to remove other tags from the same object.
Steps to reproduce - Trying to remove the label from the selectInput widget
# get the selectInputhtml<- selectInput("select_id", "label", letters)
# Remove the label
tagQuery(html)$
find("label")$
remove()
More info
My attempt at debugging
I found that when the error is raised the selectedWalkIRev function is calling func(els, fn) in its body. The error is raised when within this function we are trying to get the envKey attribute therefore raising the aforementioned error.
The cause when this is happening is that we are passing a function in the els list which I suppose is being brought from before, upper in the call stack. (See the third element below)
els
[[1]]
<!--shiny.tag.env--><labelclass="control-label"id="select_id-label"for="select_id">label</label>
[[2]]
<!--shiny.tag.env--><div><selectid="select_id"><optionvalue="a"selected>a</option><optionvalue="b">b</option># cutting the output here...
[[3]]
function ()
{
if (is_shiny_app()) {
shiny::registerThemeDependency(func)
return(mfunc(get_current_theme()))
}
mfunc(bs_global_get())
}
<bytecode:0x5641e4c32168><environment:0x5641e7ac49e8>
attr(,"class")
[1] "shiny.tag.function"
R version and package version
R version 4.2.1
htmltools 0.5.3
Traceback
9: .f(.x[[i]], i, ...)
8: func(els, fn)
7: selectedWalkIRev(elParent$children, function(child, childPos) {
if (!isTagEnv(el))
return()
childKey<-child$envKeyif (elKey==childKey) {
func(elParent, el, childPos)
asTagEnv(elParent)
}
})
6: .f(.x[[i]], ...)
5: func(els, fn)
4: tagQueryWalk(els, function(el) {
if (!isTagEnv(el))
return()
elKey<-el$envKeyelParent<-el$parent
selectedWalkIRev(elParent$children, function(child, childPos) {
if (!isTagEnv(el))
return()
childKey<-child$envKeyif (elKey==childKey) {
func(elParent, el, childPos)
asTagEnv(elParent)
}
})
})
3: tagQueryMatchChildRev(els, function(elParent, el, childPos) {
el$parent<-NULLelParent$children[[childPos]] <-NULL
})
2: tagQuerySiblingRemove(selected_)
1: tagQuery(html)$find("label")$remove()
The text was updated successfully, but these errors were encountered:
The problem
When trying to remove a tag using the
remove
method I'm getting the following error. This error is not being raised when I'm trying to remove other tags from the same object.Steps to reproduce - Trying to remove the label from the selectInput widget
More info
My attempt at debugging
I found that when the error is raised the
selectedWalkIRev
function is callingfunc(els, fn)
in its body. The error is raised when within this function we are trying to get theenvKey
attribute therefore raising the aforementioned error.The cause when this is happening is that we are passing a function in the
els
list which I suppose is being brought from before, upper in the call stack. (See the third element below)R version and package version
R version 4.2.1
htmltools 0.5.3
Traceback
The text was updated successfully, but these errors were encountered: