Skip to content

Commit

Permalink
Fix, #26
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurk91 committed Aug 8, 2020
1 parent 39608a1 commit 1d2bcda
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### [3.3.3](https://github.com/ankurk91/vue-loading-overlay/compare/3.3.2...3.3.3)
* Fix: [#26](https://github.com/ankurk91/vue-loading-overlay/issues/26) by introducing `enforceFocus` prop

### [3.3.2](https://github.com/ankurk91/vue-loading-overlay/compare/3.3.1...3.3.2)
* Fix: revert [#44](https://github.com/ankurk91/vue-loading-overlay/issues/44)
to fix [#46](https://github.com/ankurk91/vue-loading-overlay/issues/46)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ The component accepts these props:
| loader | String | `spinner` | Name of icon shape you want use as loader, `spinner` or `dots` or `bars` |
| background-color | String | `#fff` | Customize the overlay background color |
| opacity | Number | `0.5` | Customize the overlay background opacity |
| z-index | Number | `9999` | Customize the overlay z-index |
| z-index | Number | `9999` | Customize the overlay z-index |
| enforce-focus | Boolean | `true` | Force focus on loader |

* ^When `is-full-page` is set to `false`, the container element should be positioned as `position: relative`.
You can use CSS helper class `vld-parent`.
Expand Down
4 changes: 4 additions & 0 deletions src/js/Component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
type: Boolean,
default: true
},
enforceFocus: {
type: Boolean,
default: true
},
transition: {
type: String,
default: 'fade'
Expand Down
4 changes: 3 additions & 1 deletion src/js/trapFocusMixin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export default {
mounted() {
document.addEventListener('focusin', this.focusIn)
if(this.enforceFocus){
document.addEventListener('focusin', this.focusIn)
}
},
methods: {
/**
Expand Down

0 comments on commit 1d2bcda

Please sign in to comment.