File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/react-native/ReactCommon/react/renderer/core Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,15 @@ void EventQueue::enqueueEvent(RawEvent&& rawEvent) const {
34
34
auto repeatedEvent = eventQueue_.rend ();
35
35
36
36
for (auto it = eventQueue_.rbegin (); it != eventQueue_.rend (); ++it) {
37
- if (it->type == rawEvent.type &&
38
- it->eventTarget == rawEvent.eventTarget && it->isUnique ) {
39
- repeatedEvent = it;
40
- break ;
41
- } else if (it->eventTarget == rawEvent.eventTarget ) {
37
+ if (it->eventTarget == rawEvent.eventTarget ) {
42
38
// It is necessary to maintain order of different event types
43
39
// for the same target. If the same target has event types A1, B1
44
40
// in the event queue and event A2 occurs. A1 has to stay in the
45
41
// queue.
42
+ if (it->isUnique && it->type == rawEvent.type ) {
43
+ repeatedEvent = it;
44
+ }
45
+
46
46
break ;
47
47
}
48
48
}
You can’t perform that action at this time.
0 commit comments