Skip to content

Commit 6aa3717

Browse files
authored
Merge pull request #1467 from ropensci/events
events that don't emit any data should always have event priority, fixes #1466
2 parents c05f001 + a597962 commit 6aa3717

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/shiny.R

+7-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,13 @@ event_data <- function(
153153
parseJSONVal(session$rootScope()$input[[eventID]])
154154
}
155155

156-
priority <- match.arg(priority)
156+
# events that don't emit any data should _always_ be treated with event priority
157+
priority <- if (event %in% c("plotly_doubleclick", "plotly_deselect", "plotly_afterplot")) {
158+
"event"
159+
} else {
160+
match.arg(priority)
161+
}
162+
157163
if (priority == "event") {
158164
# Shiny.setInputValue() is always called with event priority
159165
# so simply return the parse input value

0 commit comments

Comments
 (0)