angularjs-slider icon indicating copy to clipboard operation
angularjs-slider copied to clipboard

Adding wrapper to template breaks functionality

Open graphical-iain opened this issue 7 years ago • 1 comments

Steps to reproduce

  1. Wrap contents of rzslider with a div

Demo: fiddle doesn't allow for additional files, so I can't demo with a custom template.

Expected behaviour

A wrapper should do nothing to functionality.

Actual behaviour

A wrapper in the template should be benign. The JS should not be reliant on the structure, but on class names or variables.

With simple div wrapper inside rz-slider: image

No wrapper: image

Static design of what I am trying to achieve: image

Edit: Updated wrapper screenshot to look better

graphical-iain avatar Oct 09 '18 19:10 graphical-iain

Hey, Yes I understand your issue.

The function responsible for this issue is this one: https://github.com/angular-slider/angularjs-slider/blob/master/src/rzslider.js#L666

I've never liked the way it was implemented and I agree that relying on classnames would be better.

Would you like to submit a PR for this?

ValentinH avatar Oct 11 '18 08:10 ValentinH