Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Link Scrolls Up To 4 Lines Below It's Related Anchor: Why? Edited

The Anchor is at the top of the page followed by Table of Contents. Further down the page is a Link which references this Anchor. When one clicks on this Link, the page scrolls up to about 4 lines below the Anchor position. One has to manually scroll the rest of the way up in order to see the full table of contents. Why does it not scroll all the way back up to the Anchor position?

The only work around I have found is to add 4 blank lines between the top anchor and the table of contents macro. So, that the full table of contents will show up when the below Link is clicked.

Any thoughts on what would cause the link to not scroll completely up to the anchor location?

1 answer

1 accepted

0 votes
Answer accepted
Diego Atlassian Team Nov 18, 2019

Hello there, @David_Fenstermacher . Thanks for sharing with the community!

So, let me start by explaining how Anchors work in Confluence.

When we insert an Anchor Macro on a Confluence page, it will create a header element with an ID. The ID will be based on the anchor name that was specified earlier.

This is how the header element looks like when inspecting the page:

Anotação 2019-11-18 105255.jpg

Anchors in Confluence are anchor links by the HTML definition. Since this is a default element within HTML, W3 has documentation on it. Here take a look:

 

How the anchor redirect happens is solely based on the browser interpretation of anchors. Here is how the anchor I created look like in Mozilla Firefox:

Anotação 2019-11-18 105404.jpg

And here is the same anchor, but in Google Chrome:

Anotação 2019-11-18 105448.jpg

As you can see, the "My Anchor is here" text does not show up in Chrome. On the other hand, it does show in Firefox.

For short, how anchors are going to behave is based on the browser. Confluence inserts the anchor and the browser interprets how to display it.

Your workaround should take care of this behavior in browsers that do display this different behavior.

I hope this helps you out, David!

You are wonderful! I have search for the reason for this behavior and you are the only person that has been able to explain this. I hope this posting helps others out as well.

Thanks!

Like Diego likes this

Great to hear that I was able to help you with that, @David_Fenstermacher Be assured that your post is likely to help other customers, that is the community spirit!

Come share with the community in the future.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

462 views 24 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you