Skip to content
This repository was archived by the owner on Apr 8, 2022. It is now read-only.
This repository was archived by the owner on Apr 8, 2022. It is now read-only.

Colorpicker closing after selecting a color, when another picker is open #310

@Josh-Nicholson

Description

@Josh-Nicholson

Description

Colorpicker closes on any click when you have navigated/clicked from another open colorpicker

Context

  • bootstrap-colorpicker version: 3.1.2
  • bootstrap version: 4.2.1
  • jQuery version: 3.4.1
  • Browser name and version: Chrome 80.0.3987.149
  • Operative System name an version: Windows 10

Expected behavior

  1. Have two colorpickers created on the page, but not shown
  2. Open one of them and select a color
  3. Whilst still having the first one open, click the element that will show the second colorpicker. The first colorpicker will now close and the second one will open.
  4. Click anywhere on the second colorpicker and remains open, and can still be interacted with

Actual behavior

  1. Have two colorpickers created on the page, but not shown
  2. Open one of them and select a color
  3. Whilst still having the first one open, click the element that will show the second colorpicker. The first colorpicker will now close and the second one will open.
  4. Click anywhere on the second colorpicker and it will close (unexcepted behaviour, it should stay open)

It should only close when the user has clicked outside of the second colorpicker.
It works correctly if you click outside of the first colorpicker anywhere on the page where another colorpicker won't be shown.

Live Example

Couldn't get jsfiddle to work with the links provided for a template.
Just create two input which each have a colorpicker.
Click on one to get the corresponding colorpicker to open.
Then click on the other input whilst the first colorpicker is still shown.
Then click anywhere on the second colorpicker and it will close

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions