Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit f30dd8c

Browse files
EladBezalelThomasBurleson
authored andcommitted
fix(ripple): changed ripple center from layerX/Y to offsetX/Y
Layer is not considering fixed/absolute positioned elements and it makes the ripple appear from the relative center of the container element, Offset is relative to the target element therefore is more accurate. fixes #4807. fixes #5508. closes #5527.
1 parent 1946bfe commit f30dd8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/services/ripple/ripple.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ InkRippleCtrl.prototype.handleMousedown = function (event) {
154154
if (this.options.center) {
155155
this.createRipple(this.container.prop('clientWidth') / 2, this.container.prop('clientWidth') / 2);
156156
} else {
157-
this.createRipple(event.layerX, event.layerY);
157+
this.createRipple(event.offsetX, event.offsetY);
158158
}
159159
};
160160

0 commit comments

Comments
 (0)