Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
0xEAB opened this issue Aug 24, 2017 · 0 comments
Open

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

0xEAB opened this issue Aug 24, 2017 · 0 comments

Comments

@0xEAB
Copy link

0xEAB commented Aug 24, 2017

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant