summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAnders Kaseorg <[email protected]>2015-01-30 21:58:44 -0500
committerAnders Kaseorg <[email protected]>2015-01-30 21:58:44 -0500
commit5c145bde7a14ed6fe0bdde773925e92c381c620a (patch)
tree621c2c33937206a6b7827a09d47e042f1597abba /index.php
parentd8895ec679fb3557ddf01d8be74a5eb82c7dac7a (diff)
Make the floating title transition smoother
Previously the floating title would not appear until the real title scrolled entirely out of view, which was visually distracting. Now it appears at the point when its bottom lines up with the real title’s bottom. This isn’t perfect yet due to small differences between the two titles’ layouts, but it’s much closer. We now need to use visibility: visible|hidden instead of display: block|none to show and hide the floating title, in order to be able to retrieve its height while it’s hidden. It’s important to use that height because occasionally line wrapping differences make the floating title shorter than the real title, and we don’t want the real title to poke out from underneath. Also fix scrollToRowId to offset by the 4 pixel top margin (like cdmScrollToArticleId already does), so that it goes back to a point when the floating title was hidden; and set the right margin on the floating title so that it’s the same width as the real title and doesn’t overlap the scroll bar. Signed-off-by: Anders Kaseorg <[email protected]>
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 4f2a9a860..058e7d8e3 100644
--- a/index.php
+++ b/index.php
@@ -265,7 +265,7 @@
<div id="headlines-wrap-inner" dojoType="dijit.layout.BorderContainer" region="center">
- <div id="floatingTitle" style="display : none"></div>
+ <div id="floatingTitle" style="visibility : hidden"></div>
<div id="headlines-frame" dojoType="dijit.layout.ContentPane"
onscroll="headlines_scroll_handler(this)" region="center">