Skip to content
This repository was archived by the owner on Mar 2, 2018. It is now read-only.

Allow closing modals by clicking on background window#236

Closed
kennyadsl wants to merge 1 commit intothoughtbot:masterfrom
kennyadsl:close-modal
Closed

Allow closing modals by clicking on background window#236
kennyadsl wants to merge 1 commit intothoughtbot:masterfrom
kennyadsl:close-modal

Conversation

@kennyadsl
Copy link
Copy Markdown
Contributor

Hi, this PR adds the ability to close modals by clicking on background window. It basically just triggers a modal-state checked change. StopPropagation on modal-inner element is needed to allow clicking inside the modal-inner without causing the modal to close (inner is inside window so the click would be triggered as well). Coffescript is generated with rake coffee.

P.S. I know you want to keep javascript as minimal as possible but I think this could be useful for someone else. I'll totally understand if this is not accepted. 😄

Comment thread source/javascripts/refills/modal.js Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mixed double and single quotes.

@Magnus-G
Copy link
Copy Markdown
Contributor

@kennyadsl nice! I like this. Looking at it now.

@kennyadsl
Copy link
Copy Markdown
Contributor Author

@Magnus-G great! let me know if you need me to change anything.

@teoljungberg teoljungberg self-assigned this Jan 29, 2015
@teoljungberg
Copy link
Copy Markdown
Contributor

Thanks @kennyadsl, It was merged in 1e026e6

Magnus-G pushed a commit that referenced this pull request Feb 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants