Automattic / Automattic/Iris

Single click on Color Selector Appends # to URL

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
259
Forks
67
PR merge metrics
No merged PRs in 30d

Description

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();
});
});
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue by initializing Iris on #color-picker and clicking .iris-square-value without dragging. Inspect the click handling around that selector; done means a single click no longer appends # to the URL or jumps the page to the top.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.