primitives icon indicating copy to clipboard operation
primitives copied to clipboard

Adds composePreventableEvent

Open CrutchTheClutch opened this issue 3 years ago • 3 comments

Description

I noticed #905 and I had a similar need for a utility like this.

  • Aims to improve the checkForDefaultPrevented api by splitting composeEventHandlers into two separate functions (composeEventHandlers & composePreventableEventHandlers).
  • Replaces a majority of the calls for composeEventHandlers with the new composePreventableEventHandlers.
  • Replaces calls where checkForDefaultPrevented was false with the reworked composeEventHandlers function.

closes #905

CrutchTheClutch avatar Jan 10 '23 14:01 CrutchTheClutch

@crutchtheclutch I'm sorry no one got back to you on this. Are you still interested in seeing this one across the finish line? If so we'd need to resolve conflicts. Totally understand if not, just let me know and I'll put this on my todo list.

chaance avatar Aug 16 '24 20:08 chaance

@chaance For sure! No worries at all, I should be able to take a look at this again early next week

CrutchTheClutch avatar Aug 16 '24 20:08 CrutchTheClutch

@chaance I believe this gets us back up to date with the current changes. I also went ahead and updated Form and Menubar since they were not components when I originally made this pull request. I'm a little unfamiliar with the codebase as it's been a while since I last looked at this, but the changes should be good to go now. I have also gone ahead and confirmed I can build locally

CrutchTheClutch avatar Aug 21 '24 21:08 CrutchTheClutch

I actually think I'm going to pass on this. IMO checkForDefaultPrevented can be avoided if we just don't use the utility in cases where we don't need the check. Something I'll probably change down the road, should time allow.

chaance avatar Jul 03 '25 00:07 chaance