@@ -268,7 +268,7 @@ runRouteViewT routeEncoder a = do
268268 errorLeft (Left e) = error (T.unpack e)
269269 errorLeft (Right x) = x
270270 (result, changeState) <- runSetRouteT $ runRoutedT a route
271− let f oldRoute change =
271+ let f (currentHistoryState, oldRoute) change =
272272 let newRoute = appEndo change oldRoute
273273 (newPath, newQuery) = encode theEncoder newRoute
274274 in HistoryStateUpdate
@@ -284,10 +284,10 @@ runRouteViewT routeEncoder a = do
284284 -- we can change this function later to accommodate.
285285 -- See: https://github.com/whatwg/html/issues/2174
286286 , _historyStateUpdate_title = ""
287− , _historyStateUpdate_uri = Just $ nullURI
287+ , _historyStateUpdate_uri = Just $ (_historyItem_uri currentHistoryState)
288288 { uriPath = newPath
289289 , uriQuery = newQuery
290290 }
291291 }
292− setState = attachWith f (current route) changeState
292+ setState = attachWith f ((,) <$> current historyState <*> current route) changeState
293293 return result