Skip to content

Commit

Permalink
Only set _attached when the DOM is laid out
Browse files Browse the repository at this point in the history
The script we're running inside the _reset code taken from Zendesk requires that
we have all DOM parts available, specifically the contentWindow of the loader frame.
  • Loading branch information
ankon committed Jun 13, 2017
1 parent 32f8340 commit d227e8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zendesk-web-widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@
},

attached: function() {
// Trigger _reset, if we have all other values available.
this._attached = true;
// Wait until everything is laid out, and then trigger a _reset
Polymer.RenderStatus.beforeNextRender(this, () => {
this._attached = true;
});
},

identify: function(userObj) {
Expand Down

0 comments on commit d227e8d

Please sign in to comment.