question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Color picker not working on Streamlit Share

See original GitHub issue

Summary

Color picker returns SecurityError: Permission denied to access property "document" on cross-origin object on Firefox or SecurityError: Blocked a frame with origin "https://apps.streamlitusercontent.com" from accessing a cross-origin frame. on Chrome, upon color selection.

Firefox : image

Chrome: image

Steps to reproduce

App: https://share.streamlit.io/andfanilo/s4a-color-picker-bug/main/app.py Code: https://github.com/andfanilo/s4a-color-picker-bug

import streamlit as st
st.color_picker("Background color hex: ", "#eee", key="main")
st.sidebar.color_picker("Background color hex: ", "#eee", key="sidebar")

Is this a regression?

yes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
samhaarcommented, Jun 3, 2021

FYI I was able to get the color picker to work on the share platform with pinned version 0.73.0 and below

1reaction
andfanilocommented, Feb 7, 2021

Actually some users have the issue. https://github.com/andfanilo/streamlit-drawable-canvas/issues/41#issuecomment-774659344

Can’t tell what triggers the issue though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Color-Picker Unexpected Behavior - Using Streamlit
Summary I am using a color picker in combination with buttons to allow users to select a color and have an easy color...
Read more >
How to add a color picker widget in Streamlit - ProjectPro
You can add a color picker widget to your Streamlit app using "st.color_picker". It returns a string. ... value -> It is the...
Read more >
The Streamlit Colour Picker: An Easy Way to Change Chart ...
The Streamlit Colour Picker: An Easy Way to Change Chart Colours on Your Streamlit Dashboard. Provide Your Dashboard Users with Greater ...
Read more >
Picking colors with Color Picker | Getting Started with Streamlit ...
Streamlit's approach to this problem is st.color_picker() , which lets the user pick a color, and returns that color in a hex string...
Read more >
Build an Image Color Analyzer App with Streamlit and Python ...
In this tutorial we will build an image color analyzer app using Streamlit, Sklearn, OpenCV and Python.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found