framework icon indicating copy to clipboard operation
framework copied to clipboard

<map><area router-href + PushState :: Whole page reloads

Open 0xEAB opened this issue 8 years ago • 0 comments

I'm submitting a bug report

Please tell us about your environment:

  • Operating System: Windows 10

  • Node Version: 6.9.4

  • NPM Version: 3.10.10
  • Aurelia CLI OR JSPM OR Webpack AND Version CLI 0.30.1
  • Browser: Chrome 59 | Edge 15.15063

  • Language: ESNext

Current behavior:

Router is configured to use the Push State API. If one clicks on the <area> link, the whole page will reload. Nevertheless, Aurelia route to the right template. So I assume PushState is not used.

app.js:

export class App {

  configureRouter(config, router) {
    config.options.pushState = true;
    // [...]

p1.html:

<template>
  <img src="p1.png" width="1280" alt="p1" usemap="#p1map">

  <map id="p1map" name="p1map">
    <area alt="p2" route-href="route: p2" shape="rect" coords="860,2830,1010,2860"/>
  </map>
</template>

Expected/desired behavior:

The app navigates in-app to the destination template/page (without reloading the website) and uses PushState.

Unfortunately, I cannot provide a runnable gist because PushState does not seem to work on GistRun:

VM564 aurelia.js:14638 ERROR [app-router] Router navigation failed, and no previous location or fallbackRoute could be restored.

  • What is the motivation / use case for changing the behavior? This bug circumvents many advantages of a SPA.

0xEAB avatar Aug 24 '17 08:08 0xEAB