NUKnightLab / NUKnightLab/TimelineJS3

No hash update when using goToPrev/goToNext

Open
#341 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
JavaScript
Stars
3.2k
Forks
645
PR merge metrics
No merged PRs in 30d

Description

Fixed it with:

// Goto previous slide
goToPrev: function() {
this.goTo(this._getSlideIndex(this.current_id) - 1);
/* BUG FIX : next 3 lines */
if (this.options.hash_bookmark && this.current_id) {
this._updateHashBookmark(this.current_id);
}
},

// Goto next slide
goToNext: function() {
    this.goTo(this._getSlideIndex(this.current_id) + 1);
    /* BUG FIX : next 3 lines */
    if (this.options.hash_bookmark && this.current_id) {
        this._updateHashBookmark(this.current_id);
    }
},

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the goToPrev and goToNext entry points and inspect how hash_bookmark and _updateHashBookmark are handled around navigation. Verify that navigating in either direction updates the URL bookmark when hash bookmarking is enabled, without changing behavior when it is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.