Permalink
Browse files

feat(modal): Make enforceFocus configurable (#706)

  • Loading branch information...
dedene authored and tmorehouse committed Jul 17, 2017
1 parent 6192dbe commit f1ab80b42d7d02ded2c7aba310755d186a0ce3a3
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/components/modal.vue
@@ -197,6 +197,10 @@
type: Boolean,
default: false
},
noEnforceFocus: {
type: Boolean,
default: false
},
hideHeader: {
type: Boolean,
default: false
@@ -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 &&

0 comments on commit f1ab80b

Please sign in to comment.