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

Fix: Add tabindex to preview container #858

Merged
merged 6 commits into from
Nov 6, 2018

Conversation

ConradJChan
Copy link
Contributor

No description provided.

@boxcla
Copy link

boxcla commented Nov 5, 2018

Verified that @ConradJChan has signed the CLA. Thanks for the pull request!

if (el) {
// If el has target property, then it is an Event
// otherwise it is a HTMLElement
const element = el.target || el;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I initially wrote this checking to see if el instanceof Event but couldn't figure out a good way to unit test it so settled on this. Open to suggestions

src/lib/Fullscreen.js Outdated Show resolved Hide resolved
src/lib/Fullscreen.js Outdated Show resolved Hide resolved
src/lib/Fullscreen.js Show resolved Hide resolved
* @param {HTMLElement|Event} el - Fullscreen element or event
* @return {void}
*/
focusFullscreenElement = (el) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like it is pretty generic, maybe add to util.js?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is and it isn't, taking either a HTMLElement or Event and extracting out the HTMLElement to focus on seems a bit specific to this logic, maybe if this situation comes up again in another file we can move it then

@ConradJChan ConradJChan merged commit a37fdb7 into box:master Nov 6, 2018
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.

4 participants