Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening URL with anchor causes exception #1402

Closed
davideschiera opened this issue Jun 22, 2016 · 0 comments
Closed

Opening URL with anchor causes exception #1402

davideschiera opened this issue Jun 22, 2016 · 0 comments

Comments

@davideschiera
Copy link

Testing URL: https://sysdig.gitbooks.io/sysdig-cloud-api/content/python/function_list.html#createdashboard
Installed plugins: edit-link

If you open the page the first time, you'll see the URL removing the anchor after a little while and the page doesn't scroll to the proper <h2 with the specified ID.

However, if you manually add #createdashboard to the URL after initial loading, the scroll works.

I tried plugins like anchors or anchor-navigation and both fail to work because of a very similar internal exception.

Please let me know how to fix or workaround the issue, as linking to specific sections of pages is a very important feature and the lack of it might cause the content to be moved elsewhere. Thanks!

Details

The first exception happens on theme.js:

                D = t.setDocument = function(e) {
                    ...
                    o(function(e) {
                        var t = r.createElement("input");
                        t.setAttribute("type", "hidden"),
                        e.appendChild(t).setAttribute("name", "D"),
                        e.querySelectorAll("[name=d]").length && P.push("name" + ne + "*[*^$|!~]?="),
                        e.querySelectorAll(":enabled").length || P.push(":enabled", ":disabled"),
                        e.querySelectorAll("*,:x"),  <<<<<<<<<<


Failed to execute 'querySelectorAll' on 'Element': '*,:x' is not a valid selector.
Error: Failed to execute 'querySelectorAll' on 'Element': '*,:x' is not a valid selector.
    at Error (native)
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:22422
    at o (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:14823)
    at t.setDocument (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:22160)
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:31254
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:31967
    at t (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:542)
    at Object.r.1 (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:655)
    at o (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:254)
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:305

The second one happens on theme.js as well:

                D = t.setDocument = function(e) {
                    ...
                    (w.matchesSelector = ve.test(M = L.matches || L.webkitMatchesSelector || L.mozMatchesSelector || L.oMatchesSelector || L.msMatchesSelector)) && o(function(e) {
                        w.disconnectedMatch = M.call(e, "div"),
                        M.call(e, "[s!='']:x"),  <<<<<<<<<<


Failed to execute 'matches' on 'Element': '[s!='']:x' is not a valid selector.
Error: Failed to execute 'matches' on 'Element': '[s!='']:x' is not a valid selector.
    at Error (native)
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:22647
    at o (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:14823)
    at t.setDocument (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:22595)
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:31254
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:31967
    at t (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:542)
    at Object.r.1 (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:655)
    at o (https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:254)
    at https://sysdig.gitbooks.io/sysdig-cloud-api/content/gitbook/theme.js:1:305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants