gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Interactive Dataframe does not update correctly on 'Enter' or 'Tab' with Firefox or Safari

Open one-lithe-rune opened this issue 11 months ago • 2 comments

Describe the bug

This occurs on Firefox for me on both Linux and Windows, it does not occur in Chrome or Edge on Windows.

When editing a cell in a Dataframe the value of the cell is only updated correctly (or at all) if I blur the cell by click outside it with the mouse.

Blurring the cell with 'Tab' does not update the existing value shown, and when the cell is re-edited the value shown for editing is blank rather than the entered value, or the original value. Blurring the cell with 'Enter' has the same behavior.

Have you searched existing issues? 🔎

  • [X] I have searched and found no existing issues

Reproduction

# This is cut down from the docs filter_records example where 
# the problem is also clearly visible.
import gradio as gr

with gr.Blocks() as demo:
    gr.Dataframe(
        headers=["name", "age", "gender"],
        datatype=["str", "number", "str"],
        row_count=5,
        col_count=(3, "fixed"),
        interactive=True,
        value=[["existing value"]]
    ),

if __name__ == "__main__":
    demo.launch(debug=True)

Screenshot

No response

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 4.22.0
gradio_client version: 0.13.0

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.2.1
altair: 5.2.0
fastapi: 0.110.0
ffmpy: 0.3.2
gradio-client==0.13.0 is not installed.
httpx: 0.27.0
huggingface-hub: 0.21.4
importlib-resources: 6.3.2
jinja2: 3.1.3
markupsafe: 2.1.5
matplotlib: 3.8.3
numpy: 1.26.4
orjson: 3.9.15
packaging: 24.0
pandas: 2.2.1
pillow: 10.2.0
pydantic: 2.6.4
pydub: 0.25.1
python-multipart: 0.0.9
pyyaml: 6.0.1
ruff: 0.3.3
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.10.0
uvicorn: 0.29.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.

gradio_client dependencies in your environment:

fsspec: 2024.3.1
httpx: 0.27.0
huggingface-hub: 0.21.4
packaging: 24.0
typing-extensions: 4.10.0
websockets: 11.0.3

Severity

Blocking usage of gradio

one-lithe-rune avatar Mar 21 '24 13:03 one-lithe-rune

I have exactly the same problem.

cfong32 avatar Mar 26 '24 17:03 cfong32

I can reproduce this bug in Firefox as well as in Safari.

dmahlow avatar Apr 02 '24 10:04 dmahlow