summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-01-27 22:11:37 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-01-27 22:11:37 +0100
commit50835be7661e2ca21ac1d6a105600e3680ba6c43 (patch)
tree78e6dae031f5bf01e359668a0f4957a836b44947
parent02e511213ae892653af32a79dbd07341d7a5f9d9 (diff)
downloadrpg-50835be7661e2ca21ac1d6a105600e3680ba6c43.tar.gz
rpg-50835be7661e2ca21ac1d6a105600e3680ba6c43.tar.bz2
scroll to preview pane on preview
darcs-hash:20060127211137-7ad00-b4433b51fe014e1b8f2e741857bd6b101e6677f5.gz
-rw-r--r--inc/html.php1
-rw-r--r--lib/exe/js.php3
2 files changed, 3 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php
index 3dd91235a..9b12ddbd1 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -269,6 +269,7 @@ function html_show($txt=''){
if ($txt){
//PreviewHeader
+ print '<br id="scroll__here" />';
print p_locale_xhtml('preview');
print '<div class="preview">';
print html_secedit(p_render('xhtml',p_get_instructions($txt),$info),$secedit);
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 488320ddd..79d846ed8 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -79,7 +79,6 @@ function js_out(){
js_runonstart("ajax_qsearch.init('qsearch_in','qsearch_out')");
js_runonstart("addEvent(document,'click',closePopups)");
js_runonstart('addTocToggle()');
- js_runonstart('scrollToMarker()');
if($edit){
// size controls
@@ -117,6 +116,8 @@ function js_out(){
// load user script
@readfile(DOKU_CONF.'userscript.js');
+ // add scroll event
+ js_runonstart('scrollToMarker()');
// initialize init pseudo event
echo 'if (document.addEventListener) {';