erikringsmuth / app-router

Router for Web Components
https://erikringsmuth.github.io/app-router/
MIT License
610 stars 83 forks source link

Make scrollToHash configurable #158

Closed web-padawan closed 7 years ago

web-padawan commented 7 years ago

Actually scrollToHash is enabled by default. It would be nice to have an option to disable it, because of:

  1. This method relies on deprecated /deep/ selector
  2. In some cases hash may not contain valid CSS selector, and this causes following errors:
    Error: Failed to execute 'querySelector' on 'Document': 'html /deep/ #68-0;' is not a valid selector.

    Will send a PR to make this configurable.