biermann Posted August 19, 2013 Report Posted August 19, 2013 Bug: Weird scrolling behaviour Browser: Chrome Interface: Any of the public papers Description:When using anchors in a document, in this test replication, military beliefs, the anchor scrolls everything. In the example I build a list and filled it with 2 href='#anchorname' links. After several <br/> I added at first a div with an id matching the anchor. Later also tried it with the <a name="anchorname" method the build in link creator seems to favor. In both cases the outcome was the same, clicking on the link does not scroll down the scrollbar of just the papers document, but it scrolls the main browser view as well to ensure the anchor is at the top of your screen. This is shown in the added screenshot below. Also added the sample code I used to replicate the bug. (also, related to my previous bug report, clicking the anchorlink will also remove the red crosses on any further pop ups. Checked to ensure it was not save/edit/ok.) <ul> <li><a title="test 1" href="#test1">test 1</a></li> <li><a title="test 2" href="#test2">test 2</a></li> </ul> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <div> <a name="test1" title="test 1"></a>this is the first test </div> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <div id="test2" title="Test 2"> this is the second test </div> Quote
Root Admin Chewett Posted August 19, 2013 Root Admin Report Posted August 19, 2013 Have you tried not using anchors? :P Fang Archbane 1 Quote
biermann Posted August 19, 2013 Author Report Posted August 19, 2013 Yes! As you can see in my papers, I know better ways then anchors. But I don't think I can quite explain the javascript way for someone clueless on html in their knowledge document :) Maybe she can use one of the templates being developed (yes yes still working on mine) and happily ignore this till then. (cause yes, it is fairly trivial) Quote
Root Admin Chewett Posted August 19, 2013 Root Admin Report Posted August 19, 2013 Yes! As you can see in my papers, I know better ways then anchors. But I don't think I can quite explain the javascript way for someone clueless on html in their knowledge document :) Maybe she can use one of the templates being developed (yes yes still working on mine) and happily ignore this till then. (cause yes, it is fairly trivial) Anchors break the chrome engine, its annoying and i havent found a nice way of fixing it so they dont, other than removing all the anchors in MD's script :)) I might work on it more later, but its annoying simply put. Quote
biermann Posted August 19, 2013 Author Report Posted August 19, 2013 Yes, it is annoying. And seeing it is purely a chrome bug, probably tricky to circumvent. Maybe I will muck about with it, or maybe I'll take the easy route and just write a javascript show hide thingie for her. Quote
The Warrior Posted August 19, 2013 Report Posted August 19, 2013 (edited) Named <a> (anchor) tags are deprecated and should not be used, according to the WHATWG and the W3C. Instead fragment-link identifiers (the #go-to-here thing) can reference any element with an id attribute. For example I want to provide an anchor link to a later heading in the document, I would use: <a href="#subheading1">Sub-Heading 1</a> which would take me to: <h2 id="subheading1">Sub-Heading 1</h2> I don't know if this fixes the problem in MD, but it will be what chrome is expecting to see. Edited August 19, 2013 by The Warrior Quote
Root Admin Chewett Posted August 19, 2013 Root Admin Report Posted August 19, 2013 Named <a> (anchor) tags are deprecated and should not be used, according to the WHATWG and the W3C. Instead fragment-link identifiers (the #go-to-here thing) can reference any element with an id attribute. For example I want to provide an anchor link to a later heading in the document, I would use: <a href="#subheading1">Sub-Heading 1</a> which would take me to: <h2 id="subheading1">Sub-Heading 1</h2> I don't know if this fixes the problem in MD, but it will be what chrome is expecting to see. MD cant fix a users code being wrong :) Quote
biermann Posted August 19, 2013 Author Report Posted August 19, 2013 Yes, but the a href version is just what the editor used :) I started with id tags, didn't help much. Md ca't fix wrong user code, but fixing wrong chrome workings is nearly impossible too Read some stuff about using absolute positioning and such to fix it. Maybe I will poke around with that. Doesn't matter though. Wrote a jquery div hide, was quicker :) Quote
Root Admin Chewett Posted June 17, 2014 Root Admin Report Posted June 17, 2014 Chrome is broken, Must fix code for chrome to work Quote
I am Bored Posted April 11, 2015 Report Posted April 11, 2015 This is a duplicate of this bug report, which was recently fixed. Quote
Ary Endleg Posted April 11, 2015 Report Posted April 11, 2015 This all is too messy for me to understand if it is or isn't duplicate, but I'll trust you on this one too :)) Moved. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.