Skip to content

Commit

Permalink
feat(modal): Make enforceFocus configurable (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
dedene authored and tmorehouse committed Jul 17, 2017
1 parent 6192dbe commit f1ab80b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/components/modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@
type: Boolean,
default: false
},
noEnforceFocus: {
type: Boolean,
default: false
},
hideHeader: {
type: Boolean,
default: false
Expand Down Expand Up @@ -359,7 +363,8 @@
enforceFocus(e) {
// If focus leaves modal, bring it back
// Event Listener bound on document
if (this.is_visible &&
if (!this.noEnforceFocus &&
this.is_visible &&
document !== e.target &&
this.$refs.content &&
this.$refs.content !== e.target &&
Expand Down

0 comments on commit f1ab80b

Please sign in to comment.