diff --git a/src/swipe/index.js b/src/swipe/index.js index bd74a4843..401db97cd 100644 --- a/src/swipe/index.js +++ b/src/swipe/index.js @@ -166,7 +166,10 @@ export default createComponent({ clearTimeout(this.timer); - const rect = this.$el.getBoundingClientRect(); + const rect = { + width: this.$el.offsetWidth, + height: this.$el.offsetHeight, + }; this.rect = rect; this.swiping = true; diff --git a/src/swipe/test/__snapshots__/demo.spec.js.snap b/src/swipe/test/__snapshots__/demo.spec.js.snap index 745aef78c..2d41fe2cd 100644 --- a/src/swipe/test/__snapshots__/demo.spec.js.snap +++ b/src/swipe/test/__snapshots__/demo.spec.js.snap @@ -4,44 +4,44 @@ exports[`renders demo correctly 1`] = `