diff --git a/pwiki2.html b/pwiki2.html
index ba60d99..653ed8c 100755
--- a/pwiki2.html
+++ b/pwiki2.html
@@ -166,6 +166,7 @@ require.config({
document.pwikiloaded = new Event('pwikiloaded')
+REFRESH_DELAY = 20
// start loading pWiki...
require(['./browser'], function(browser){
@@ -186,8 +187,9 @@ require(['./browser'], function(browser){
: '/'+path
startSpinner()
// NOTE: setTimeout(..) to allow the spinner to start...
+ // NOTE: this seems not to work if the REFRESH_DELAY is too small...
setTimeout(function(){
- pwiki.location = [path, hash] }, 0) })
+ pwiki.location = [path, hash] }, REFRESH_DELAY) })
pwiki
.onBeforeNavigate(function(){
saveNow() })
@@ -226,7 +228,7 @@ require(['./browser'], function(browser){
lnk.addEventListener('click', function(evt){
startSpinner()
setTimeout(function(){
- that.refresh() }, 0) }) } })
+ that.refresh() }, REFRESH_DELAY) }) } })
// wait for stuff to finish...
browser.setup.then(function(){
diff --git a/pwiki2.js b/pwiki2.js
index 6c45fa5..0a4fe72 100755
--- a/pwiki2.js
+++ b/pwiki2.js
@@ -9,11 +9,6 @@
* ...bug likely in .text
* XXX might also be a good idea to investigate a .tree directory index
* as a supplement to .paths()
-* XXX BUG: changing the URL does not start the spinner...
-* chech:
-* - url (hashchange)
-* - click link
-* - history back/foreward
* XXX Q: can we access fs from a pwa???
* XXX start writing docs in pwiki
* - WYSIWYG markdown editor/viewer (ASAP)