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

Update component when clicking anchor #2555

Open
yueduz opened this issue Dec 16, 2019 · 8 comments
Open

Update component when clicking anchor #2555

yueduz opened this issue Dec 16, 2019 · 8 comments
Assignees
Labels
Area: Core For anything dealing with Mithril core itself Type: Bug For bugs and any other unexpected breakage

Comments

@yueduz
Copy link

yueduz commented Dec 16, 2019

[email protected]

Chromium and Linux

mithril updated the component when I clicked on the anchor. I think doing nothing but scrolling the page is the correct behavior.

I have done the following settings

m.route.prefix = ""
@yueduz yueduz added the Type: Bug For bugs and any other unexpected breakage label Dec 16, 2019
@pygy
Copy link
Member

pygy commented Dec 16, 2019

IIRC I already shared your assessment around the v1.0 release, but Leo disagreed and he was still running the show.

We can probably revisit this.

@ChrisGitIt
Copy link

Hi everybody, isn't this a case for "ev.preventDefault()" or m.redraw = false?

@yueduz: What exactly are you doing? What is "the anchor"? You mean a named anchor?

@osban
Copy link
Contributor

osban commented Dec 18, 2019

Yeah, onclick: e => e.redraw = false would work.

@dead-claudia
Copy link
Member

@pygy Could you link to that discussion?

@yueduz
Copy link
Author

yueduz commented Dec 19, 2019

大家好,“ ev.preventDefault()”或m.redraw = false是否不是这种情况?

@yueduz:您到底在做什么?什么是“锚”?你是说一个命名的锚?

Is a link containing a "#":
https://blog.juying.co/content/Linux%E4%B8%8B%E4%BD%BF%E7%94%A8Mac%E9%94%AE%E7%BB%91%E5%AE%9A%E9%A3%8E%E6%A0%BC#%E5%BA%9F%E8%AF%9D%E8%AF%B4%E5%AE%8C%E4%BA%86%EF%BC%8C%E6%88%91%E4%BB%AC%E5%BC%80%E5%A7%8B

@pygy
Copy link
Member

pygy commented Dec 23, 2019

@isiahmeadows See #1270 (and also #1088 for a counter-argument)

@StephanHoyer
Copy link
Member

won't fix for me

@StephanHoyer
Copy link
Member

StephanHoyer commented Mar 1, 2022

From the admin-channel by @dead-claudia

@StephanHoyer #2555 is probably worth fixing IMHO - I still stand with my comment in #1088. In general, we should only redraw on changes to the parts of the route that impact routing.
Pathname: path + query
Query: query only
Hash: hash only
I wouldn't count it as a release blocker, though, especially considering it's potentially breaking and best held for v3.

I'm ok with that

@dead-claudia dead-claudia moved this to Needs triage in Triage/bugs Sep 2, 2024
@dead-claudia dead-claudia added the Area: Core For anything dealing with Mithril core itself label Sep 2, 2024
@dead-claudia dead-claudia moved this from Needs triage to Low priority in Triage/bugs Sep 2, 2024
@dead-claudia dead-claudia mentioned this issue Oct 13, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core For anything dealing with Mithril core itself Type: Bug For bugs and any other unexpected breakage
Projects
Status: Low priority
Development

No branches or pull requests

6 participants