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

pat-inject: Use history: record for each injection triggered by "click" events on "anchor" elements. #822

Open
thet opened this issue Mar 22, 2021 · 1 comment

Comments

@thet
Copy link
Member

thet commented Mar 22, 2021

Often the history: record configuration isn't used when it should. This leads to changing pages without having the URLs changed in the browser bar. And this leads to some other problems, like a sidebar not being updated based on the state of the window.location object or the page not being bookmark/shareable because the window.location entry is wrong.

I think we can just use the history: record option by default for all injections triggered by a click event on a anchor element.

@cornae
Copy link
Member

cornae commented Mar 22, 2021

Changing that default will have unoversee-able consequences for al projects that use Patterns. The discussion has been held before and there has also been similar proposal #703 there’s also #684 which made place for CBS files #748, which would solve the issue like this:

a {
  @pattern inject {
    history: record;
  }
}

I would rather propose to take this case as a test case for a small POC around the CBS concept rather than potentially disrupting a lot of projects.

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

2 participants