Skip to content

Commit

Permalink
fix(cleanupStatus): cleanup message container when it's outside the d…
Browse files Browse the repository at this point in the history
…efault document (#1204)

* fix cleanup a11y-status-message div, when is created
outside of default document

* updating size-snapshot.json

Co-authored-by: Milan Turon <[email protected]>
  • Loading branch information
kolaps33 and mituron authored Jan 7, 2021
1 parent 57a41cf commit 2edda8b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"downshift.umd.min.js": {
"bundled": 159308,
"minified": 52847,
"gzipped": 14370
"bundled": 151457,
"minified": 50039,
"gzipped": 13404
},
"downshift.umd.js": {
"bundled": 201286,
"minified": 70555,
"bundled": 201322,
"minified": 70558,
"gzipped": 18310
},
"downshift.esm.js": {
"bundled": 144155,
"minified": 65053,
"gzipped": 14199,
"bundled": 144191,
"minified": 65056,
"gzipped": 14198,
"treeshaked": {
"rollup": {
"code": 2275,
"import_statements": 318
},
"webpack": {
"code": 4623
"code": 4626
}
}
},
"downshift.cjs.js": {
"bundled": 148878,
"minified": 69088,
"gzipped": 14414
"bundled": 148914,
"minified": 69091,
"gzipped": 14413
}
}
6 changes: 3 additions & 3 deletions src/set-a11y-status.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {debounce} from './utils'

const cleanupStatus = debounce(() => {
getStatusDiv().textContent = ''
const cleanupStatus = debounce((documentProp) => {
getStatusDiv(documentProp).textContent = ''
}, 500)

/**
Expand All @@ -15,7 +15,7 @@ function setStatus(status, documentProp) {
}

div.textContent = status
cleanupStatus()
cleanupStatus(documentProp)
}

/**
Expand Down

0 comments on commit 2edda8b

Please sign in to comment.