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

fix #310, onFinish outside the slider #312

Merged
merged 3 commits into from
Oct 6, 2015

Conversation

ncoquelet
Copy link

Fix for #310

In the pointerUp function, the callOnFinish() callback is call if we release the click inside the slider or if we are in dragging mode, line 736.

Unfortunately, the dragging mode is set to false just before ! line 727.

And the onFinish is never call
http://jsfiddle.net/sbx6zcnm/3/

I have move the this.dragging = false at the end of the function and it works fine, but I don't know all the consequences !

http://jsfiddle.net/sbx6zcnm/4/

@ncoquelet
Copy link
Author

if you prefer I can change the code by using a tmp var for the dragging

        pointerUp: function (e) {
            if (this.current_plugin !== this.plugin_count) {
                return;
            }

            if (this.is_active) {
                this.is_active = false;
            } else {
                return;
            }

            this.$cache.cont.find(".state_hover").removeClass("state_hover");

            this.force_redraw = true;
            var dragging = this.dragging;
            this.dragging = false;

            if (is_old_ie) {
                $("*").prop("unselectable", false);
            }

            this.updateScene();
            this.restoreOriginalMinInterval();

            // callbacks call
            if ($.contains(this.$cache.cont[0], e.target) || dragging) {
                this.is_finish = true;
                this.callOnFinish();
            }
        },

@IonDen IonDen added the [bug] low priority Bug or not a bug? label Sep 30, 2015
@IonDen IonDen self-assigned this Sep 30, 2015
@IonDen
Copy link
Owner

IonDen commented Sep 30, 2015

Hi, this weekend.

@IonDen IonDen added the Feature request Request for a new functionality label Sep 30, 2015
@IonDen
Copy link
Owner

IonDen commented Oct 6, 2015

Hello, @ncoquelet. Thx for fixing this bug. New release will be ready soon.

IonDen added a commit that referenced this pull request Oct 6, 2015
@IonDen IonDen merged commit 78f4599 into IonDen:master Oct 6, 2015
@IonDen
Copy link
Owner

IonDen commented Oct 13, 2015

Release 2.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[bug] low priority Bug or not a bug? Feature request Request for a new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants