Commit e8e271a8 authored by xifeiwu's avatar xifeiwu Committed by hetech

ScrollBar: prevent right button click on thumb (#14196)

parent df95baf2
...@@ -40,6 +40,10 @@ export default { ...@@ -40,6 +40,10 @@ export default {
methods: { methods: {
clickThumbHandler(e) { clickThumbHandler(e) {
// prevent click event of right button
if (e.ctrlKey || e.button === 2) {
return;
}
this.startDrag(e); this.startDrag(e);
this[this.bar.axis] = (e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction])); this[this.bar.axis] = (e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]));
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment