Skip to content

Commit 206d2b4

Browse files
committed
fix(element-selection): fix wrong event to read shiftKey
1 parent 388c71a commit 206d2b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/element-selection/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ export default class CropperSelection extends CropperElement {
399399
let { aspectRatio } = this;
400400

401401
// Locking aspect ratio by holding shift key
402-
if (!isPositiveNumber(aspectRatio) && (event as PointerEvent).shiftKey) {
402+
if (!isPositiveNumber(aspectRatio) && relatedEvent.shiftKey) {
403403
aspectRatio = isPositiveNumber(width) && isPositiveNumber(height) ? width / height : 1;
404404
}
405405

0 commit comments

Comments
 (0)