Skip to content

Commit e8e271a

Browse files
xifeiwuziyoung
authored andcommitted
ScrollBar: prevent right button click on thumb (ElemeFE#14196)
1 parent df95baf commit e8e271a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/scrollbar/src/bar.js

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export default {
4040

4141
methods: {
4242
clickThumbHandler(e) {
43+
// prevent click event of right button
44+
if (e.ctrlKey || e.button === 2) {
45+
return;
46+
}
4347
this.startDrag(e);
4448
this[this.bar.axis] = (e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]));
4549
},

0 commit comments

Comments
 (0)