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

Rethethering issue when target element is re-rendered. #112

Closed
KristiyanHristov opened this issue Apr 20, 2016 · 2 comments
Closed

Rethethering issue when target element is re-rendered. #112

KristiyanHristov opened this issue Apr 20, 2016 · 2 comments

Comments

@KristiyanHristov
Copy link

Actual behavior

When the target element gets removed and added again, the current step stays attached to the last known target position. After scrolling the step gets attached to (0,0). This seems somewhat similar to #95.

Expected behavior

The step should stay attached to the target element even when it gets re-rendered (marionette.js view). It should try to reattach itself to an element with the same selector.

Steps to reproduce

  1. start tour (with a step that is attached to an element)
  2. remove the element the current step is attached to
  3. add the same element (that has the same selector)
  4. scroll the page
@KristiyanHristov
Copy link
Author

KristiyanHristov commented Apr 26, 2016

i managed to find a dumb "solution"

var tether = Shepherd.activeTour.getCurrentStep().tether;
var $newTarget = $(tether.options.target).first();
tether.target = $newTarget[0];
tether.position();

@RobbieTheWagner
Copy link
Member

This should no longer be an issue, since we moved to popper, but could persist in a different way. Closing for now, in favor of opening a new issue if there are more problems.

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