Automattic / Iris

A(n awesome) Color Picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single click on Color Selector Appends # to URL

jeryj opened this issue · comments

If you just Click the circle selector instead of Dragging it, it will append a # to the URL, causing the page to jump to the top.

Temporary fix until it's fixed in the repo:

jQuery(document).ready(function($){
    $('#color-picker').iris();

   // after initializing iris on your element(s)
   $('.iris-square-value').click(function(e) {
       e.preventDefault();
   });
});