turnermm / Dokuwiki-Nav-Overlay

Creates floating window at the template level that can be toggled open and closed into which navigation plugins (or any other pages) can be inserted
https://www.dokuwiki.org/plugin:overlay
GNU General Public License v2.0
1 stars 0 forks source link

"Att/Det"-problem #5

Open virk opened 6 years ago

virk commented 6 years ago

We use this plugin to display indexmenu in it. Sometimes I have the problem, that clicking on the index button does not cause the overlay to appear but "nothing" happens and sometimes the overlay-window appears with "Att/Det" written at the top of this window. Myron already answered that this could be related to cookies, which cannot be saved. If this occurs, I cannot make use of this overlay-function. I now updated to a new Macbook Pro with High Sierra and the problem reappeared. All the methods I used before to "solve" the problem (deleting caches, deleting history, deleting Safari-preferences) did not help. To open a "private window" always helps to solve the problem, but of course this is not the way I would like to solve it.

I am a little bit lost, because I do not know, how to solve my problem now. It may be related to my specific configuration of the operating system but I do not know.

Am I the only one with this problem? Has anybody got a solution (for me)?

turnermm commented 6 years ago

Unfortunately, I can't test on the current Safaris because my macbook is too old. But if you are getting the Att/Del menu option, then you have an old version of the plugin and so try updating . Att="attach", Del="delete". Recent version say "Attach" and "Detach". When attached, the overlay stays fixed to the browser window, and moves with it. When detached, the browser window moves but the overlay stays fixed to wherever you place it.

virk commented 6 years ago

I have the actual version, I am sure :-) If it works, it says Attach or Detach; only if the mistake occurs it shows "Att/Det" where "normally" Attach OR Detach should appear. You once mentioned this could be related to non-saving of cookies.

turnermm commented 6 years ago

Clear out you browser cache and your dokuwiki cache. One of them is holding on to the earlier version. Or uninstall and then reinstall.

turnermm commented 6 years ago

And when you uninstall make sure that the entire folder contents has been removed.

virk commented 6 years ago

In your script.js at line 104, I think that is gonna happen in case of mistake.

turnermm commented 6 years ago

Thank you for pointing that out. You are correct, that was meant to be a fall-back, in case no position and type results were found for the overlay. But just the button name is not enough. So, please try out the attached version of script.js. It includes position and type values for the overlay, if none have been found. This still does not explain why you are losing your position data; it only fills in the missing values with the defaults. script.zip

And please let me know if it helps.

virk commented 6 years ago

Myron, I will test that version and will report as soon as the "mistake" reoccurs. The problem is it only happens occasionally, sometimes in connecting with pluggin/unplugging 2nd screen and sleep. But I will report. Thank you!

Additionally: My progamming skills are limited: In "old script.js" line 97 you write: if(ptype == 'fixed') {
while in line 100 you write: else if(ptype == "absolute")

So sometimes you use ' and then ". I think this has no influence but it occured to me :-)

Further question: Can I force the mistake somehow by f.e. deleting a (cache) file etc.?

turnermm commented 6 years ago

The double and single quotes are not significant here. Truthfully, I don't think you will have this problem again. So, I've updated the plugin with this new change.