See https://github.com/plotly/plotly.js/pull/4762/files#r418409746 