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

change allowTransparency to allowtransparency #1538

Merged
merged 1 commit into from Dec 13, 2019
Merged

change allowTransparency to allowtransparency #1538

merged 1 commit into from Dec 13, 2019

Conversation

dawidvdh
Copy link
Contributor

Changed allowTransparencyto allowtransparency to account for the following react error:

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

react - 16.1.1
react-dom - 16.1.1

@@ -108,7 +108,7 @@ const SVGDOM_ATTRIBUTE_NAMES = {

const DOM_PROPERTY_NAMES = [
// Standard
'acceptCharset', 'accessKey', 'allowFullScreen', 'allowTransparency', 'autoComplete', 'autoFocus', 'autoPlay',
'acceptCharset', 'accessKey', 'allowFullScreen', 'allowtransparency', 'autoComplete', 'autoFocus', 'autoPlay',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did react remove support for this property? I’m reasonably sure it was supported at the time this list was created. What version dropped support for it?

The lowercase one is just a generic custom property name; there’s no need to include it in the list at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was removed in facebook/react#10823, which was released in 16.1.0. It must have been missed when making the release notes.

@@ -108,7 +108,7 @@ const SVGDOM_ATTRIBUTE_NAMES = {

const DOM_PROPERTY_NAMES = [
// Standard
'acceptCharset', 'accessKey', 'allowFullScreen', 'allowTransparency', 'autoComplete', 'autoFocus', 'autoPlay',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, it should be present unless the React version declared in the settings is 16.1+.

@gaearon
Copy link
Collaborator

gaearon commented Nov 16, 2017

Can you completely remove it? That's what React did. This attribute only works for IE8 and lower. React stopped supporting them more than a year ago.

@ljharb
Copy link
Member

ljharb commented Nov 16, 2017

We should be supporting what is, not what the documentation claims things are. It seems like the attribute arrives in the HTML in every browser prior to React 16.1; whether it has functionality or not isn't particularly relevant.

@ljharb
Copy link
Member

ljharb commented Dec 13, 2019

I rebased this and added the version logic.

@ljharb ljharb merged commit fd3cebb into jsx-eslint:master Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants