Bug-report: data-scrollto console error if no dom element id exists

1 reply · opened May 12, 2021

Ooleg_king2May 12, 2021

Before (Canvas 6.1) it was possible to make something like this:


- [Contacts](/#contacts)

If this HTML code appeared in main page (where #contacts exists) - it just scrolled to such section, if no #contacts section (on other pages) - go to root of web site (and scroll to #contacts there), which was a perfect behavior, as for me.

After upgrading to Canvas 6.3 something was changed - repeating error appears in console:


plugins.js:2297 Uncaught TypeError: Cannot read property 'top' of undefined
    at window.SEMICOLON_linkScrollSettings (plugins.js:2297)
    at HTMLAnchorElement. (plugins.js:2244)
    at Function.each (jquery-3.6.0.js:385)
    at jQuery.fn.init.each (jquery-3.6.0.js:207)
    at window.SEMICOLON_linkScrollInit (plugins.js:2239)
    at Object.execFunc (functions.js:108)
    at functions.js:137
    at dispatch (jquery-3.6.0.js:5430)
    at elemData.handle (jquery-3.6.0.js:5234)
    at Object.trigger (jquery-3.6.0.js:8719)

I think it is needed to add a check if element exists before trying to get its params (like offset and similar).

SSemicolon WebSTAFFMay 12, 2021

Hello,

Thanks for reporting this. We are already aware of this issue and are already working on eliminating this error. We will be releasing an update by Friday which will include this update.

Meanwhile, we will update the codes here for you shortly. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard