Commit bb6eb67
authored
fix(browser): hide spinner on main-frame load errors in BrowserClient (#68)
BrowserClient flips BrowserCallback.onLoadingStateChanged on
onPageStarted (true) and onPageFinished (false), but does not
override onReceivedError. On many failure modes (DNS, certificate,
offline, 4xx/5xx) onPageFinished does not always fire after the
error, so the toolbar / progress UI stays stuck on isLoading = true
even though the page never loaded.
Add a main-frame-only onReceivedError override that flips
isLoading = false too. isForMainFrame keeps a single blocked
sub-resource from flipping the spinner off while the main load is
still running.1 parent 7f2c2d4 commit bb6eb67
1 file changed
Lines changed: 16 additions & 0 deletions
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
| |||
0 commit comments