File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class RootViewPrivate : public QObject {
5353 RootView* q_ptr;
5454 bool remoteJSDebugging = false ;
5555 QNetworkReply* liveReloadUrlReply = nullptr ;
56+ QSet<ulong> m_processedEvents;
5657
5758 RootViewPrivate (RootView* q) : q_ptr(q) {}
5859
@@ -330,13 +331,20 @@ void RootView::componentComplete() {
330331void RootView::sendMouseEvent (QMouseEvent* event, const QString& eventType, QQuickItem* receiver) {
331332 Q_D (RootView);
332333
334+ if (d->m_processedEvents .contains (event->timestamp ())) {
335+ return ;
336+ } else {
337+ d->m_processedEvents .clear ();
338+ }
339+
333340 QVariantMap e = makeReactTouchEvent (receiver, event);
334341 if (e.isEmpty ())
335342 return ;
336343
337344 d->bridge ->enqueueJSCall (" RCTEventEmitter" ,
338345 " receiveTouches" ,
339346 QVariantList{normalizeInputEventName (eventType), QVariantList{e}, QVariantList{0 }});
347+ d->m_processedEvents .insert (event->timestamp ());
340348 event->setAccepted (true );
341349}
342350
You can’t perform that action at this time.
0 commit comments