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

Gallery: deselect images when losing focus. #4330

Merged
merged 1 commit into from Jan 8, 2018

Conversation

Projects
None yet
3 participants
@jorgefilipecosta
Member

jorgefilipecosta commented Jan 5, 2018

Description

This PR should close issue "Clicking outside block should deselect image item in gallery -
#4315".
It uses componentWillReceiveProps to check when focus is lost and in this situations unselects the image. A simpler approach would be to change the isSelected condition to also require focus but when returning to the block without pressing an image e.g: keyboard or clicking the ellipsis the selection would magically return which is not desirable.

How Has This Been Tested?

Add a gallery with images select an image move the focus to another block, verify the image becomes unselected.

@aduth

This comment has been minimized.

Show comment
Hide comment
@aduth

aduth Jan 5, 2018

Member

This PR should close issue "Clicking outside block should deselect image item in gallery -
#4315".

As an FYI noting a few of your past PRs, you can auto-close related issues with keywords like "Fixes #4315".

https://help.github.com/articles/closing-issues-using-keywords/

Member

aduth commented Jan 5, 2018

This PR should close issue "Clicking outside block should deselect image item in gallery -
#4315".

As an FYI noting a few of your past PRs, you can auto-close related issues with keywords like "Fixes #4315".

https://help.github.com/articles/closing-issues-using-keywords/

@aduth

aduth approved these changes Jan 5, 2018

Show outdated Hide outdated blocks/library/gallery/block.js Outdated

@jorgefilipecosta jorgefilipecosta merged commit 03a42f0 into master Jan 8, 2018

3 checks passed

codecov/project 39.82% (-0.02%) compared to 08e8394
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jorgefilipecosta jorgefilipecosta deleted the update/gallery-deselect-images-losing-focus branch Jan 8, 2018

@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Jan 8, 2018

Contributor

Thanks!

Contributor

mtias commented Jan 8, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment