Smooth scrolling is coming natively to the DOM scroll methods: http://src.chromium.org/viewvc/blink?view=revision&revision=178755
On Wed, Sep 10, 2014 at 9:19 AM, Atomiko Lex <[email protected]> wrote: > So now I followed the tip and rewrote the hash link to: > > <core-item id="core_item" label="Topic" horizontal center layout> > <a href="javascript:document.querySelector('html /deep/ > #p1').scrollIntoView()"></a></core-item>, and that does the trick. > > Of course it would be nicer to use some sort of smooth scroll animation, > but if I understand correctly that wouldn't work with shadow dom. > > Lex > > > Am Mittwoch, 10. September 2014 11:18:08 UTC+2 schrieb > > Atomiko Lex: > >> Maybe there is a hint >> <http://stackoverflow.com/questions/25689640/create-anchor-element-in-polymer> >> out >> there already. This user over at stackoverflow suggests a workaround with >> >> scrollIntoViewFunc(document.querySelector("html /deep/ #someid"))... >> Trying to digg a little further, Lex >> >> >> >> Am Mittwoch, 10. September 2014 10:11:40 UTC+2 schrieb Atomiko Lex: >>> >>> I guess this is a problem still, as menus without hash links won't work >>> for smaller pages where the links you are following lead to just a couple >>> of lines of content. Most users will bounce as they won't click such links. >>> >>> Should I file an issue for this anywhere, or is there one already, >>> maybe? >>> >>> Also, would you have any ideas for putting together a script as >>> workaround? Would I use the jQuery .scrollTop() method and set a vertical >>> pixel target for all paragraphs linked to from my menu, instead of using >>> fragment identifiers? But then, wouldn't I have to calculate the viewports >>> of the users before, and then deliver different values for the scroll bar >>> position for each user? >>> >>> Sorry for putting up so many questions, I am no coder... >>> >>> Lex >>> >>> >>> Am Dienstag, 9. September 2014 19:28:54 UTC+2 schrieb Atomiko Lex: >>>> >>>> Ok, thank you for your help, I was going crazy already... I guess it's >>>> just no single page site then, no problem. >>>> >>>> Maybe someone could add that info over here >>>> <http://www.polymer-project.org/docs/elements/core-elements.html#core-item> >>>> ? >>>> >>>> Lex >>>> >>>> Am Dienstag, 9. September 2014 19:10:37 UTC+2 schrieb Elliott Sprehn: >>>>> >>>>> Scrolling the page by fragment doesn't work in Shadow DOM, you'll need >>>>> to scroll using script instead if you want to do this. >>>>> >>>>> On Tue, Sep 9, 2014 at 7:36 AM, Atomiko Lex <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi there, still trying to set up a simple page... >>>>>> >>>>>> Now I am having trouble getting anchor links to work inside a >>>>>> core-item element: >>>>>> <core-item id="core_item1" icon="flag" label="Aktuelles" horizontal >>>>>> center layout> >>>>>> <paper-ripple fit></paper-ripple><a href="#p1" >>>>>> target="_self"></a></core-item> >>>>>> >>>>>> And the corresponding link target is: >>>>>> <h2 id="p1">Aktuelles</h2> >>>>>> >>>>>> Am I doing something really stupid, again? >>>>>> >>>>>> Lex >>>>>> >>>>>> Follow Polymer on Google+: plus.google.com/107187849809354688692 >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Polymer" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To view this discussion on the web visit https://groups.google.com/d/ >>>>>> msgid/polymer-dev/3c8281b2-d9a8-4e45-b8fd-9615d4514b2f% >>>>>> 40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/polymer-dev/3c8281b2-d9a8-4e45-b8fd-9615d4514b2f%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> Follow Polymer on Google+: plus.google.com/107187849809354688692 > --- > You received this message because you are subscribed to the Google Groups > "Polymer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/polymer-dev/54046a3c-5835-49b5-9f3f-f86fa002e6d4%40googlegroups.com > <https://groups.google.com/d/msgid/polymer-dev/54046a3c-5835-49b5-9f3f-f86fa002e6d4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CACGqRCCr4UgFr2R1tEDstxOYS%2BFPpFjkW1NvNHwp1WUV%3D%2BcRVA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
