itsjavi / bootstrap-colorpicker

Bootstrap Colorpicker is a modular color picker plugin for Bootstrap.
https://itsjavi.com/bootstrap-colorpicker/
MIT License
1.38k stars 367 forks source link

I have fixed a TODO that was left in the code. #297

Closed antag0n1st closed 4 years ago

antag0n1st commented 5 years ago

in the file , PopupHandler.js there is a TODO on line 347.

// TODO: fix having to click twice outside when losing focus and last 2 clicks where inside the colorpicker

in order to fix it , add this after line 315 in the fireShow method

(0, _jquery2.default)(this.root.document).on('mouseup.colorpicker touchend.colorpicker', _jquery2.default.proxy(function(){ this.clicking = false; }, this));

This resets the clicking state that you remember , which is the cause of the bug.

Sorry I have never made a pull request before , I'm not sure how to do it. But I hope you will find a minute to insert this easy fix.

itsjavi commented 4 years ago

I am closing this since no one else requested this fix and there are any PRs for it. thanks anyway