This is not a bug as per the current design, but it's odd and we should probably change it. Polymer considers all path related attributes to be relative to the importing document.
I suggest filing this issue against Polymer. On Mon, Jul 21, 2014 at 3:18 PM, Rob Dodson <[email protected]> wrote: > + sorvell > > Steve, does this seem like an imports bug? I noticed that <a href="#bad"> > actually gets converted to <a href="x-foo.html#bad"> in the devtools. Why > would it change the href on my anchor tags? > > > On Sun, Jul 20, 2014 at 8:07 PM, Justin Merz <[email protected]> wrote: > >> I still have to use method calls to update the hash. Can we file a >> ticket somewhere? >> On Jul 20, 2014 8:11 PM, <[email protected]> wrote: >> >>> Any update/bug filed for this issue where I can check the status? I am >>> hitting similar issue with Polymer 0.3.4. >>> >>> >>> On Tuesday, 20 May 2014 06:55:07 UTC+8, Rob Dodson wrote: >>>> >>>> Basically I'm agreeing with you. #bad is doing the wrong thing. It >>>> shouldn't open a new page. >>>> >>>> >>>> On Mon, May 19, 2014 at 3:54 PM, Rob Dodson <[email protected]> wrote: >>>> >>>>> >>>>> >>>>> >>>>> On Mon, May 19, 2014 at 3:49 PM, Justin Merz <[email protected]> wrote: >>>>> >>>>>> I defined the element in index.html to demonstrate the working >>>>>> version. >>>>>> >>>>>> I am confused as to why you would say that #bad is doing the right >>>>>> thing. Clicking that link will take you to that element as a new page in >>>>>> the browser. When should updating the hash via a href take you to a new >>>>>> page? >>>>>> >>>>>> >>>>> I said "It seems like the real problem is that hash links inside of a >>>>> repeating template inside of an imported element do the right thing." The >>>>> #ok links are the ones in the repeating template. They seem to be doing >>>>> the >>>>> right thing IMO. #bad is outside the repeating template, and is doing the >>>>> wrong thing. >>>>> >>>>> >>>>>> >>>>>> On Monday, May 19, 2014 9:42:32 AM UTC-7, Rob Dodson wrote: >>>>>> >>>>>>> [+ dfreedm] >>>>>>> >>>>>>> Stripped down gist is here >>>>>>> <https://gist.github.com/robdodson/614210dd05d6b8f34ff0> >>>>>>> >>>>>>> Daniel, any idea what's going on here? >>>>>>> >>>>>>> >>>>>>> On Mon, May 19, 2014 at 9:39 AM, Rob Dodson <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> Hm that's weird. You can remove the element defined in index.html >>>>>>>> because it doesn't do anything. It seems like the real problem is that >>>>>>>> hash >>>>>>>> links inside of a repeating template inside of an imported element do >>>>>>>> the >>>>>>>> right thing. And links outside a repeating template in an imported >>>>>>>> element >>>>>>>> do the wrong thing. >>>>>>>> >>>>>>>> >>>>>>>> On Sunday, May 18, 2014 3:40:14 PM UTC-7, Justin Merz wrote: >>>>>>>>> >>>>>>>>> Not sure if this is a bug or I am missing something, but I have >>>>>>>>> put together to following test. https://github.com/jrmerz/poly >>>>>>>>> mer-hash-test/blob/master/public/index.html, sorry I didn't use >>>>>>>>> jsbin, not sure how use it with imports for this example. The anchor >>>>>>>>> tag >>>>>>>>> works fine in the element defined in index.html. But if you look at >>>>>>>>> test-two https://github.com/jrmerz/polymer-hash-test/blob/ma >>>>>>>>> ster/public/test-two.html you will see the anchor tags work great >>>>>>>>> in the <template repeat="">...</template> but the <a href="#bad">Bad >>>>>>>>> Hash >>>>>>>>> Link</a> is turned into <a href="test-two.html#bad">Bad Hash Link</a>. >>>>>>>>> Thoughts, ideas, suggestions? >>>>>>>>> >>>>>>>>> -Thanks >>>>>>>>> Justin >>>>>>>>> >>>>>>>>> >>>>>>> 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/18e77b02-fa90-4d6a-8e01-53a68eddff0e% >>>>>> 40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/polymer-dev/18e77b02-fa90-4d6a-8e01-53a68eddff0e%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/CAL0om6Z3P2saYm06jj1GQtzUb4G_q-Xyfa5W47LObO-q89qtDA%40mail.gmail.com >> <https://groups.google.com/d/msgid/polymer-dev/CAL0om6Z3P2saYm06jj1GQtzUb4G_q-Xyfa5W47LObO-q89qtDA%40mail.gmail.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/CA%2BrMWZhy6Wbrj2H8A%3D%2BCOFSNafF38n7O_-t8DhYD_XVa5M948A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
