shithub: mycel

Download patch

ref: d7a54dfa83c869f442cd919898f75ca475ce1f7d
parent: cee10df58933854e4f59ac2a1c87a3cba20dc6af
author: Philip Silva <philip.silva@protonmail.com>
date: Sun Aug 22 07:43:13 EDT 2021

Fix short freeze after link click

--- a/browser/browser.go
+++ b/browser/browser.go
@@ -1492,6 +1492,13 @@
 
 func (b *Browser) SetAndLoadUrl(u *url.URL) func() duit.Event {
 	return func() duit.Event {
+		// Stop updating existing widgets
+		if scroller != nil {
+			scroller.Free()
+			scroller = nil
+		}
+		b.showBodyMessage("")
+
 		if !b.loading {
 			b.loading = true
 			b.LocationField.Text = u.String()