Skip to content

Add missing blur event to gr.Number #11261

@ExcellentAmericanEagle

Description

@ExcellentAmericanEagle

Describe the bug

The gr.Number component is missing the blur event, even thought it was added back in 2022 #2449 alongside gr.Textbox which has it.

In the changes of #2448 I noticed it almost fully added it, but it misses adding "blur" documentation to gr.Number:

# Textbox has it:
@document("change", "submit", "blur", "style")

# Number doesn't:
@document("change", "submit", "style")

It's also missing from the latest gr.Number Docs

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

number = gr.Number() 

# `blur` isn't a property of of `number`
number.blur()

Screenshot

No response

Logs

$ python src/__main__.py 
5.31.0
Traceback (most recent call last):
  File "C:\Users\user\projects\gradio-sandbox\src\__main__.py", line 19, in <module>
    number.blur()
    ^^^^^^^^^^^
AttributeError: 'Number' object has no attribute 'blur'

System Info

Gradio Environment Information:
------------------------------
Operating System: Windows
gradio version: 5.31.0
gradio_client version: 1.10.1

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

aiofiles: 24.1.0
anyio: 4.9.0
audioop-lts: 0.2.1
fastapi: 0.115.12
ffmpy: 0.5.0
gradio-client: 1.10.1
groovy: 0.1.2
httpx: 0.28.1
huggingface-hub: 0.30.2
jinja2: 3.1.6
markupsafe: 3.0.2
numpy: 2.2.5
orjson: 3.10.18
packaging: 25.0
pandas: 2.2.3
pillow: 11.2.1
pydantic: 2.11.4
pydub: 0.25.1
python-multipart: 0.0.20
pyyaml: 6.0.2
ruff: 0.11.8
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.46.2
tomlkit: 0.13.2
typer: 0.15.3
typing-extensions: 4.13.2
urllib3: 2.4.0
uvicorn: 0.34.2
mcp is not installed.
pydantic: 2.11.4
authlib is not installed.
itsdangerous is not installed.


gradio_client dependencies in your environment:

fsspec: 2025.3.2
httpx: 0.28.1
huggingface-hub: 0.30.2
packaging: 25.0
typing-extensions: 4.13.2
websockets: 15.0.1

Severity

Blocking usage of gradio

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions