@@ -182,11 +182,10 @@ runRouteViewT
182182 , MonadFix m
183183 )
184184 => (ValidEncoder (Either Text) r PageName)
185− -> (r -> Text)
186185 -> (Text -> r) -- ^ 404 page
187186 -> RoutedT t r (EventWriterT t (Endo r) m) a
188187 -> m a
189−runRouteViewT routeValidEncoder routeToTitle error404 a = do
188+runRouteViewT routeValidEncoder error404 a = do
190189 rec historyState <- manageHistory $ HistoryCommand_PushState <$> setState
191190 let route :: Dynamic t r
192191 route = fmap (runIdentity . _validEncoder_decode (catchValidEncoder error404 $ pageNameValidEncoder . routeValidEncoder) . (uriPath &&& uriQuery) . _historyItem_uri) historyState
@@ -196,7 +195,17 @@ runRouteViewT routeValidEncoder routeToTitle error404 a = do
196195 (newPath, newQuery) = _validEncoder_encode (pageNameValidEncoder . routeValidEncoder) newRoute
197196 in HistoryStateUpdate
198197 { _historyStateUpdate_state = DOM.SerializedScriptValue jsNull
199− , _historyStateUpdate_title = routeToTitle newRoute
198+ -- We always provide "" as the title. On Firefox, Chrome, and
199+ -- Edge, this parameter does nothing. On Safari, "" has the
200+ -- same behavior as other browsers (as far as I can tell), but
201+ -- anything else sets the title for the back button list item
202+ -- the *next* time pushState is called, unless the page title
203+ -- is changed in the interim. Since the Safari functionality
204+ -- is near-pointless and also confusing, I'm not going to even
205+ -- bother exposing it; if there ends up being a real use case,
206+ -- we can change this function later to accommodate.
207+ -- See: https://github.com/whatwg/html/issues/2174
208+ , _historyStateUpdate_title = ""
200209 , _historyStateUpdate_uri = Just $ nullURI
201210 { uriPath = newPath
202211 , uriQuery = newQuery