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

Pass down focus prop in Toolbar component #1007

Merged
merged 1 commit into from
Jun 2, 2017
Merged

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jun 2, 2017

Closes #975. Props @BE-Webdesign!

@ellatrix
Copy link
Member Author

ellatrix commented Jun 2, 2017

I'm not sure why the linter didn't catch this.

@ellatrix ellatrix requested a review from youknowriad June 2, 2017 15:21
@aduth
Copy link
Member

aduth commented Jun 2, 2017

I'm not sure why the linter didn't catch this.

Was just about to ask the same thing 😄

@BE-Webdesign
Copy link
Contributor

Yeah, no idea, good thing we are starting to add tests in.

@aduth
Copy link
Member

aduth commented Jun 2, 2017

Guessing it was considering it as the window global focus?

https://developer.mozilla.org/en-US/docs/Web/API/Window/focus

@BE-Webdesign
Copy link
Contributor

Guessing it was considering it as the window global focus?

That sounds like the culprit.

@ellatrix
Copy link
Member Author

ellatrix commented Jun 2, 2017

Huh, didn't even know that existed.

@ellatrix
Copy link
Member Author

ellatrix commented Jun 2, 2017

I'm all for removing the browser setting and explicitly getting from the window object...

@ellatrix ellatrix merged commit db7431d into master Jun 2, 2017
@ellatrix ellatrix deleted the fix/toolbar-focus branch June 2, 2017 15:25
@aduth
Copy link
Member

aduth commented Jun 2, 2017

I'm all for removing the browser setting and explicitly getting from the window object...

Worth exploring. Are window and document considered permitted only by that env flag though? Webpack remaps global as window if I recall correctly, so at worst we'd have global.getComputedStyle, global.document.querySelector, etc.

@ellatrix
Copy link
Member Author

ellatrix commented Jun 2, 2017

Actually, I removed the browser flag, and it still does not error.

@aduth
Copy link
Member

aduth commented Jun 2, 2017

Might be picking up default from eslint-config-wordpress, which we extend:

https://github.com/WordPress-Coding-Standards/eslint-config-wordpress/blob/25114c9/index.js#L4

In which case we'd need to explicitly set it to false.

@ellatrix
Copy link
Member Author

ellatrix commented Jun 2, 2017

@aduth Perfect! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants