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

Instance location does not update correctly #99

Open
jeffjenk opened this issue Oct 30, 2015 · 0 comments
Open

Instance location does not update correctly #99

jeffjenk opened this issue Oct 30, 2015 · 0 comments

Comments

@jeffjenk
Copy link

We are using messenger to deploy messages to multiple locations within our app. For example we deploy messages to the page header by default but to a modal window if a modal is currently deployed on the page.

When a message first deploys the instance location is set. If the location changes there is a comparison between the instance location and the chosen location and the message is moved to the chosen location but the instance location is not updated to reflect the new chosen location. This causes messages to stop displaying if the location changes back to the instance location like if modal window is closed for example.

We propose the following update to fix this bug:

// Current code
...
} else if (!$(inst._location).is($(chosen_loc))) {
  inst.$el.detach();
  $parent.prepend(inst.$el);
}
...
// Proposed fix
...
} else if (!$(inst._location).is($(chosen_loc))) {
  inst.$el.detach();
  $parent.prepend(inst.$el);
  inst._location = chosen_loc;
}
...
jeffjenk pushed a commit to jeffjenk/messenger that referenced this issue Oct 30, 2015
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

1 participant