Skip to content

Commit

Permalink
patch: pr7933 (#7935)
Browse files Browse the repository at this point in the history
* fix(CustomResizeObserver): remove set src to iframe (#7933)

(cherry picked from commit a71c41a)

* fix(CustomResizeObserver): fix test
  • Loading branch information
EldarMuhamethanov authored Nov 12, 2024
1 parent 0f259a7 commit 8ed3576
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/vkui/src/components/DateInput/DateInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ describe('DateInput', () => {
it('should call onChange with zero sec/ms', async () => {
jest.useFakeTimers();
const onChange = jest.fn();
const { container } = render(<DateInput value={undefined} onChange={onChange} />);
const inputLikes = getInputsLike(container);
render(<DateInput value={undefined} onChange={onChange} {...testIds} />);
const inputLikes = getInputsLike();

const [dates, months, years] = inputLikes;

Expand Down
1 change: 0 additions & 1 deletion packages/vkui/src/lib/floating/customResizeObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export class CustomResizeObserver {

observeUsingIframe(element: HTMLElement): void {
const iframe = element.ownerDocument.createElement('iframe');
iframe.src = 'javascript:void(0)';
iframe.ariaHidden = 'true';
iframe.tabIndex = -1;
Object.assign(iframe.style, defaultIframeStyles);
Expand Down

0 comments on commit 8ed3576

Please sign in to comment.