Skip to content

Commit

Permalink
chore(core): pageXOffset/pageYOffset to scrollX/scrollY
Browse files Browse the repository at this point in the history
They are deprecated and legacy api
  • Loading branch information
mlaursen committed Aug 4, 2024
1 parent 291fff0 commit 46e3681
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/core/src/interaction/utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { KeyboardEvent, MouseEvent, TouchEvent } from "react";
import { type KeyboardEvent, type MouseEvent, type TouchEvent } from "react";
import { findSizingContainer } from "../positioning/utils.js";
import type {
ElementInteractionState,
RippleState,
RippleStyle,
import {
type ElementInteractionState,
type RippleState,
type RippleStyle,
} from "./types.js";

/** @internal */
Expand Down Expand Up @@ -61,8 +61,8 @@ export function getRippleStyle(
({ pageX, pageY } = event);
}

x = pageX - (left + window.pageXOffset);
y = pageY - (top + window.pageYOffset);
x = pageX - (left + window.scrollX);
y = pageY - (top + window.scrollY);
}

const radius = getRadius(x, y, width, height);
Expand Down

0 comments on commit 46e3681

Please sign in to comment.