Skip to content

Commit

Permalink
React DOM: Treat toggle and beforetoggle as discrete events (#29176)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored May 20, 2024
1 parent 6f90365 commit bf046e8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export function findInstanceBlockingTarget(
export function getEventPriority(domEventName: DOMEventName): EventPriority {
switch (domEventName) {
// Used by SimpleEventPlugin:
case 'beforetoggle':
case 'cancel':
case 'click':
case 'close':
Expand Down Expand Up @@ -321,6 +322,7 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority {
case 'resize':
case 'seeked':
case 'submit':
case 'toggle':
case 'touchcancel':
case 'touchend':
case 'touchstart':
Expand All @@ -345,7 +347,6 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority {
case 'select':
case 'selectstart':
return DiscreteEventPriority;
case 'beforetoggle':
case 'drag':
case 'dragenter':
case 'dragexit':
Expand All @@ -358,7 +359,6 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority {
case 'pointerout':
case 'pointerover':
case 'scroll':
case 'toggle':
case 'touchmove':
case 'wheel':
// Not used by React but could be by user code: (fall through)
Expand Down

0 comments on commit bf046e8

Please sign in to comment.