Skip to content

Made clicking on more parts of the backdrop dismiss modal#357

Merged
davwheat merged 4 commits intojossmac:masterfrom
hsource:dismiss-backdrop-click
Mar 21, 2020
Merged

Made clicking on more parts of the backdrop dismiss modal#357
davwheat merged 4 commits intojossmac:masterfrom
hsource:dismiss-backdrop-click

Conversation

@hsource
Copy link
Copy Markdown
Contributor

@hsource hsource commented Mar 20, 2020

Description of changes:

Previously, clicking on the header, the footer, or any part of the "track" above or below the image failed to dismiss the modal.

Related issues (if any):

Pull request #313: another attempt at this that relied on a blacklist rather than a whitelist. I think a whitelist is still safer, as it won't make other buttons unclickable and still leaves text in the caption selectable
Fixes #351

Checks:

  • Please confirm yarn run lint ran successfully
  • Please confirm that only /src and /examples/src are committed
  • [if new feature] Please confirm that documentation was added to the README.md

Also manually tested to verify the change:

  • Clicking full-screen, close, and selecting text in footer all work
  • Clicking on backdrop above/below, in header area, and footer area all dismiss the modal

After

@hsource
Copy link
Copy Markdown
Contributor Author

hsource commented Mar 20, 2020

@davwheat - thanks for releasing the new versions lately! Can you take a look at this?

@davwheat
Copy link
Copy Markdown
Collaborator

Thank you so much for the PR @hsource

I keep getting notifications for this repo buried under everything else, so a reminder is very useful.

@davwheat davwheat merged commit a74c4bc into jossmac:master Mar 21, 2020
@davwheat davwheat self-assigned this Mar 21, 2020
@k4mr4n
Copy link
Copy Markdown

k4mr4n commented Mar 30, 2020

@hsource Thanks for this PR. I tried it locally and it actually makes closeOnBackdropClick works.
@davwheat Can you release it in the next version, please?

@davwheat
Copy link
Copy Markdown
Collaborator

davwheat commented Apr 10, 2020

@k4mr4n It's already included in v1.1.0 which was released 2 weeks ago.

@k4mr4n
Copy link
Copy Markdown

k4mr4n commented Apr 12, 2020

@davwheat I have the latest version (v1.1.0) and checked the dist folder (node_modules/react-images/dist/**) and handleBackdropClick function does not have these changes.

/** UPDATE */
v1.1.2 has it now
Thanks

@davwheat
Copy link
Copy Markdown
Collaborator

Yep I realised I forgot to build before publishing 1.1.0! Sorry... 😅

@k4mr4n
Copy link
Copy Markdown

k4mr4n commented Apr 12, 2020

no worries, thank you for this great library 🙏

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.

closeOnBackdropClick works on backdrop to the left and right of image, but not above and below image

3 participants