Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FocusableIframe: React does not recognize the forwardedRef prop on a DOM element #8560

Closed
mmtr opened this issue Aug 5, 2018 · 1 comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience Needs Testing Needs further testing to be confirmed.

Comments

@mmtr
Copy link
Contributor

mmtr commented Aug 5, 2018

Describe the bug
When rendering a FocusableIframe, the following warning message appears in the console:

Warning: React does not recognize the forwardedRef prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase forwardedref instead. If you accidentally passed it from a parent component, remove it from the DOM element.

To Reproduce
Execute the code below in a new React project after installing @wordpress/components.

import React from 'react';
import ReactDOM from 'react-dom';
import { FocusableIframe } from '@wordpress/components';

import '@wordpress/components/build-style/styles.css';

const MyFocusableIframe = () => (
	<FocusableIframe
		src="/"
		onFocus={ () => console.log( 'iframe is focused' ) }
	/>
);
ReactDOM.render(
	<MyFocusableIframe />,
	document.getElementById( 'root' )
);

Expected behavior
No warning message should appear.

Desktop:

  • OS: macOS High Sierra
  • Browser Chrome
  • Version 67

Additional context
Issue found while working on #8338 and Automattic/wp-calypso#26367

@designsimply designsimply added [Feature] Extensibility The ability to extend blocks or the editing experience Needs Testing Needs further testing to be confirmed. labels Aug 7, 2018
@aduth
Copy link
Member

aduth commented May 31, 2019

Fixed by #8570

@aduth aduth closed this as completed May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience Needs Testing Needs further testing to be confirmed.
Projects
None yet
Development

No branches or pull requests

3 participants