Double click broken

Issue #9 resolved
Former user created an issue

Seems like there is something broken with the double click behavior after the last update. When I click on a namespace it is not closing anymore, instead it will always be treated like a normal link (double click).

Here is my debug:

Debug

Comments (4)

  1. D. C. Stoyanov repo owner

    Since I can't reproduce this issue, could you please:

    1. Close and reopen the window browser (to be sure AcMenu's cookies are deleted)
    2. Uninstal and Install again AcMenu Plugin (don't use Re-Install)
    3. Your <start-page> page is called start?
    4. Your namespaces have link of the form: http://<your.domain>/doku.php?id=<namespace>:<sub-namespace>:<start-page>?
    5. Does this happen with all your namespaces?
    6. Could you check if you have the same issue with my menu http://tormec.my-board.org/doku.php
  2. David Peplow

    Okay, I think i got it. I am using pretty URLs and _REGEX returns NULL if it is not matching, what happens because there is no "doku.php?id=" inside of the url-string . I could solve this by replacing _REGEX.exec() with _REGEX.replace().

    Here is the updated function:

    // OLD FUNCTION
    function trim_url(url) {
        const _REGEX = /(?:\/doku\.php\?id=)(.[^#]*)/g;
        var trimmed_url = _REGEX.exec(url);
    
        return trimmed_url[1];
    }
    
    // UPDATED FUNCTION
    function trim_url(url) {
        return url.replace(/\/(doku\.php\?id=)?/,''); 
    }
    
  3. D. C. Stoyanov repo owner

    Your solution works and I'm going to release a fixed version of the plugin, but thank to this issue I see I don't handle neither url of the form: http://example.com/dokuwiki/wiki:syntax nor http://example.com/dokuwiki/wiki/syntax and maybe some other options from the Advanced section in the Configuration Settings.

    So, ASAP I will release another version.

  4. Log in to comment