Skip to content

Commit

Permalink
Revert "fix(onStart): Remove stop propagation call so events will bub…
Browse files Browse the repository at this point in the history
…ble up (#612)"

This reverts commit 65a7fae.
  • Loading branch information
Valentin Hervieu committed Mar 30, 2018
1 parent a1ba079 commit dacb898
Show file tree
Hide file tree
Showing 10 changed files with 465 additions and 431 deletions.
16 changes: 10 additions & 6 deletions dist/rzslider.css

Large diffs are not rendered by default.

831 changes: 416 additions & 415 deletions dist/rzslider.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rzslider.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/rzslider.min.js

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions dist/rzslider.scss

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/rzslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,7 @@
ehEnd,
eventNames = this.getEventNames(event)

event.stopPropagation()
event.preventDefault()

// We have to do this in case the HTML where the sliders are on
Expand Down
8 changes: 8 additions & 0 deletions tests/specs/mouse-controls/range-slider-horizontal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -64,6 +65,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -79,6 +81,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.maxH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand All @@ -97,6 +100,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand Down Expand Up @@ -308,6 +312,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -326,6 +331,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -341,6 +347,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.maxH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand All @@ -359,6 +366,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand Down
8 changes: 8 additions & 0 deletions tests/specs/mouse-controls/range-slider-vertical-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -65,6 +66,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -80,6 +82,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.maxH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand All @@ -98,6 +101,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand Down Expand Up @@ -302,6 +306,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -320,6 +325,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -335,6 +341,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.maxH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand All @@ -353,6 +360,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('highValue')
expect(helper.slider.maxH.hasClass('rz-active')).to.be.true
})
Expand Down
4 changes: 4 additions & 0 deletions tests/specs/mouse-controls/single-slider-horizontal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -63,6 +64,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand Down Expand Up @@ -247,6 +249,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -265,6 +268,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand Down
4 changes: 4 additions & 0 deletions tests/specs/mouse-controls/single-slider-vertical-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -64,6 +65,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand Down Expand Up @@ -266,6 +268,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.calledWith(helper.slider.minH).should.be.true
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand All @@ -284,6 +287,7 @@
helper.slider.callOnStart.called.should.be.true
helper.slider.focusElement.called.should.be.false
event.preventDefault.called.should.be.true
event.stopPropagation.called.should.be.true
expect(helper.slider.tracking).to.equal('lowValue')
expect(helper.slider.minH.hasClass('rz-active')).to.be.true
})
Expand Down

0 comments on commit dacb898

Please sign in to comment.