Laker-Compendium icon indicating copy to clipboard operation
Laker-Compendium copied to clipboard

Anchor links require two taps

Open Sagelt opened this issue 13 years ago • 4 comments

Ive been working on a laker app that uses anchors to link within a page. Something like this:

Details

Jump to details

The issue I'm having is that when you tap on the link once nothing happens. Tapping the link again gets the expected result (jumps to anchor).

Is this a known issue? Is there a workaround? Linking between dossiers works fine, it's just anchors within a dossier that don't work.

Sagelt avatar Oct 18 '11 22:10 Sagelt

hmmm thats maybe something for the baker-guys... Could you post it in there forums?

Thanks!

ffranke avatar Oct 19 '11 11:10 ffranke

Thanks for the suggestion, it looks like it might be related to this issue: https://github.com/Simbul/baker/issues/64

I'm going to mess around with a more recent version of Baker and see if that solves the problem.

Sagelt avatar Oct 19 '11 15:10 Sagelt

I've dug into this a bit more. First off, the a:hover style seems to be a problem when linking within a page.

With that gone Baker 3.0 links to anchors are resolved by running some JavaScript that gets the offset of the matching element within the page. The issue is that with Laker's CSS these offsets are wrong, I'm not sure why. Oddly enough, a second tap on the same link will jump to the anchor correctly. I'm guessing that when the link navigation is not updating the URL some other (correct) logic is hit, but I haven't found what yet.

Sagelt avatar Oct 20 '11 00:10 Sagelt

Is there any progress on this issue? I've narrowed it and from what I can say it's working properly if you go down the page, ie. target link is under the tapped link, but it requires double tap when you go the oposite way - from down to up. Haven't figured the solution though, even if I tried a LOT. Any help would be appreciated since that's very annoying bug.

Bobramyl avatar Feb 06 '12 23:02 Bobramyl