yCodeTech/horizontal-timeline-2.0

Bug on initialisation in Safari [Submitted via email on 27/09/2019]

yCodeTech opened this issue · 1 comments

Describe the bug
I'm encountering a strange issue in Safari browser on initialisation, with an error in the console thrown by jQuery (vers. 3.4.1)

Horizontal Timeline 2.0 Release Version:

  • Version [2.0.5-alpha.2]

Desktop (please complete the following information):

  • Browser [e.g. chrome, safari]: Safari, no issue on other browsers.

Errors:

unrecognized expression: link[href*="font-awesome"

Additional context
My initialisation code:

$(document).ready(function(){
    $('#history-timeline').horizontalTimeline({
        dateDisplay: "year",
        useNavBtns: true,
        useScrollBtns: false,
        iconBaseClass: "far fa-3x",
        scrollLeft_iconClass: "d-none",
        scrollRight_iconClass: "d-none",
        prev_iconClass: "fa-arrow-alt-circle-left",
        next_iconClass: "fa-arrow-alt-circle-right"
    });
})

[submitted via email on 27/09/2019]

This bug was fixed in Version 2.0.5 Pre-release 3 [v2.0.5-alpha.3]. The bug was caused by a typo in the attribute contains selector in the addFile function, so the fileExists check failed with unrecognized expression errors, of which only Safari seemed to spit out the error.


After fixing this, a subsequent error occurred relating to undefined not being a function in the plugin's checks for undefined variables. This is not fixable due to jQuery 3+ only supporting the latest version of Safari (which is not testable on Windows 10), as this issue on jQuery's Github Repo explains.