Took me a while to find this bug.
beforeinput is often used by rich text editors (contenteditable), e.g Slate which I try to port to Preact. I could add the event listener manually but then I would probably need to maintain my own fork and Im not going to do that, especially considering that it's in beta and receives breaking updates all the time.
It seems that it would be a special case for Preact events logic and add few bytes because 'onbeforeinput' in el doesn't work. Is this something you're willing to consider?
Can confirm. The devtools show that BeforeInput is bound. Looks like we don't lowercase it, although we should. Just checked with FF and Chrome: onbeforeinput is not available as a property.
/cc @developit
Using the lowercase event name works in Preact <div onbeforeinput={}>, and I suspect the React community is going to have to make the transition to case-sensitive event names lest we end up stuck with huge mappings. I kinda hope Preact could lead that charge.
Fair enough 馃憤 Left a content on the PR for Upton's to move forward with :)
hey @adjourn are you able to get slate working with this addition to preact/compat?
@matthewmueller I eventually discovered that some Slate logic depends on React's synthetic events. Most basic functionality works but you'll eventually start running into bugs if e.g using void elements.