diff --git a/inst/htmlwidgets/plotly.js b/inst/htmlwidgets/plotly.js
index d1efe9c264..0662cbd1a8 100644
--- a/inst/htmlwidgets/plotly.js
+++ b/inst/htmlwidgets/plotly.js
@@ -296,7 +296,7 @@ HTMLWidgets.widget({
// send user input event data to shiny
- if (HTMLWidgets.shinyMode) {
+ if (HTMLWidgets.shinyMode && Shiny.setInputValue) {
// Some events clear other input values
// TODO: always register these?