Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/reactpy/core/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import dis
import inspect
from collections.abc import Callable, Sequence
from functools import lru_cache
from functools import lru_cache, partial
from types import CodeType
from typing import Any, Literal, cast, overload

Expand Down Expand Up @@ -107,6 +107,9 @@ def __init__(
while hasattr(func_to_inspect, "__wrapped__"):
func_to_inspect = func_to_inspect.__wrapped__

if isinstance(func_to_inspect, partial):
func_to_inspect = func_to_inspect.func

found_prevent_default, found_stop_propagation = _inspect_event_handler_code(
func_to_inspect.__code__
)
Expand Down