DioxusLabs / DioxusLabs/blitz

Tracking: Event handling

Open
#257 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.1k
Forks
203
Avg merge
8h 58m
Merged PRs (30d)
112

Description

# Event handling

Roughly ordered by priority, but if you need something not marked as high-priority then please feel free to request it!

For many events we need to implement both:
- The ability to handle the event in scripts (e.g. Dioxus Native or a future JavaScript scripting engine)
- The default event action in case the event is not handled by script (scrolling the page, clicking on a button, typing into a text input, etc).

## Performance optimizations

These will be an important part of implementing performance-sensitive events (that can get called at very high frequency) such as scroll, mousemove, mouseenter, mouseleave, mouseover and mouseout, etc):

- [x] Avoid process event if there are no events of that type in the entire vdom
- [ ] Avoid sending event into vdom if there are no handlers for the target element

## High-priority events

### Mouse Click
- [x] onclick
- [x] onauxclick
- [x] ondblclick
- [x] onmousedown
- [x] onmouseup
- [x] oncontextmenu

### Mouse Move
- [x] onmousemove
- [x] "hover" events:
- [x] onmouseenter
- [x] onmouseleave
- [x] onmouseout
- [x] onmouseover

### Scroll/Wheel
- [x] onwheel
- [x] onscroll
- [ ] onscrollend

### Keyboard
- [x] onkeydown
- [x] onkeypress
- [x] onkeyup

### Change / Input
- [ ] onchange
- [x] oninput
- [ ] onbeforeinput

### Touch
- [x] Gesture recognition on mobile for scrolling on pan
- [x] ontouchstart
- [x] ontouchend
- [x] ontouchmove
- [x] ontouchcancel

### Pointer
- [x] onpointerdown
- [x] onpointerup
- [x] onpointercancel
- [x] onpointermove
- [x] onpointerover
- [x] onpointerout
- [x] onpointerenter
- [x] onpointerleave

### Form
- [x] onsubmit
- [ ] onreset
- [ ] onformdata
- [ ] oninvalid

### Ui Events
- [ ] onload
- [ ] onunload
- [ ] onerror
- [ ] onabort
- [ ] onselect

### Focus
- [x] onfocus
- [x] onblur
- [x] onfocusin
- [x] onfocusout

### Composition
- [ ] oncompositionstart
- [ ] oncompositionupdate
- [ ] oncompositionend

### Clipboard
- [ ] oncopy
- [ ] oncut
- [ ] onpaste

### Pointer Capture
- [ ] ongotpointercapture
- [ ] onlostpointercapture
- [ ] onpointerrawupdate

### Shadowdom
- [ ] onslotchange

### Dragndrop
- [ ] ondrag
- [ ] ondragend
- [ ] ondragenter
- [ ] ondragleave
- [ ] ondragover
- [ ] ondragstart
- [ ] ondrop

### Find-In-Page
- [ ] onbeforematch

### Dialog/Popover
- [ ] ontoggle
- [ ] onbeforetoggle
- [ ] oncancel
- [ ] onclose
- [ ] oncommand

### Media
- [ ] oncanplay
- [ ] oncanplaythrough
- [ ] oncuechange
- [ ] ondurationchange
- [ ] onemptied
- [ ] onended
- [ ] onloadeddata
- [ ] onloadedmetadata
- [ ] onloadstart
- [ ] onpause
- [ ] onplay
- [ ] onplaying
- [ ] onseeked
- [ ] onseeking
- [ ] onprogress
- [ ] onstalled
- [ ] onratechange
- [ ] onvolumechange
- [ ] onsuspend
- [ ] ontimeupdate
- [ ] onwaiting

### Printing
- [ ] onbeforeprint
- [ ] onafterprint

### Canvas
- [ ] oncontextlost
- [ ] oncontextrestored

### Navigation/History/Online
- [ ] onhashchange
- [ ] onpopstate
- [ ] onbeforeunload
- [ ] onunload
- [ ] onoffline
- [ ] ononline

### Global/Settings
- [ ] onresize
- [ ] onlanguagechange
- [ ] onsecuritypolicyviolation
- [ ] onstorage

### Server-Sent Events
- [ ] onmessage
- [ ] onmessageerror

### Page Events
- [ ] onpagehide
- [ ] onpagereveal
- [ ] onpageshow
- [ ] onpageswap

### Javascript
- [ ] onrejectionhandled
- [ ] onunhandledrejection

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.