Skip to content

Commit 0c24da2

Browse files
wchbborgesr
authored andcommitted
Stop propagation of mouse events on slider (rstudio#1631)
see (rstudio#711)
1 parent 4ee4adb commit 0c24da2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

inst/www/shared/ionrangeslider/js/ion.rangeSlider.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,7 @@
767767
*/
768768
pointerDown: function (target, e) {
769769
e.preventDefault();
770+
e.stopPropagation();
770771
var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
771772
if (e.button === 2) {
772773
return;
@@ -810,6 +811,7 @@
810811
*/
811812
pointerClick: function (target, e) {
812813
e.preventDefault();
814+
e.stopPropagation();
813815
var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
814816
if (e.button === 2) {
815817
return;

tools/updateIonRangeSlider.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/usr/bin/env Rscript
22

33
# This script copies resources from ion.RangeSlider to shiny's inst
4-
# directory. The ion.RangeSlider/ project directory should be on the same level
4+
# directory. The ion.rangeSlider/ project directory should be on the same level
55
# as the shiny/ project directory.
66

7+
# The version of ion.rangeSlider that we use is modified from the base version
8+
# in two ways:
9+
# * In our version, mouse events on the slider are not propagated to lower
10+
# layers (#711, #1630).
11+
# * We include a custom skin for Shiny.
12+
713
# This script can be sourced from RStudio, or run with Rscript.
814

915
# Returns the file currently being sourced or run with Rscript

0 commit comments

Comments
 (0)