Skip to content

Commit

Permalink
Fix initialization issue if container is not visible
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwep committed Jul 6, 2020
1 parent fe72acb commit 0d445e5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/pickr.es5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.es5.min.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/pickr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/js/pickr.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ class Pickr {
const that = this;
requestAnimationFrame((function cb() {

if (!app.offsetWidth && app.parentElement !== opt.container) {
// TODO: Performance issue due to high call-rate?
if (!app.offsetWidth) {
return requestAnimationFrame(cb);
}

Expand Down

0 comments on commit 0d445e5

Please sign in to comment.