[MGNLFE-208] Greenbars sometimes not appearing on a SSG project Created: 01/Jun/22 Updated: 22/Jun/22 Resolved: 17/Jun/22 |
|
| Status: | Closed |
| Project: | Magnolia Frontend Helpers |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Robert Šiška | Assignee: | Phong Le Quoc |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 8d 1.5h | Time Spent: | 8d 1.5h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| Template: |
|
|||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
|||||||||||||||||||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
|||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
|||||||||||||||||||||||||
| Epic Link: | Support | |||||||||||||||||||||||||
| Sprint: | DevX 12 | |||||||||||||||||||||||||
| Story Points: | 5 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Description |
|
We rely on the onload callback of the script element. (See PageEditorBridge#40). But it turns out that although the onload is called after the script is downloaded by the browser and inserted to DOM, it takes several milliseconds for the necessary functions to be loaded. See this fiddle: https://jsfiddle.net/RobSis/bgk62y9t/10/ Currently, we delay the call by 200 milliseconds, which explains why it happens only sometimes. Something more robust will be needed, either a wait loop or some kind of callback from the PageEditor script. |