mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Expose JSResponderHandler API in Fabric UIManager
Summary: This diff adds the new API required to implment JSResponderHandler in FabricUIManager The new API differs from the old API, but since setJSResponder is called ONLY from JS it's not necessary to have this method as part of UIManager interface. Reviewed By: JoshuaGross Differential Revision: D16543440 fbshipit-source-id: ca4bd4c1e4df706cda0eb16798e01f3350558d06
This commit is contained in:
committed by
Facebook Github Bot
parent
d123bea8c1
commit
470ace0932
@@ -43,10 +43,6 @@ public interface UIManager extends JSIModule, PerformanceCounter {
|
||||
*/
|
||||
void dispatchCommand(int reactTag, String commandId, @Nullable ReadableArray commandArgs);
|
||||
|
||||
void setJSResponder(int reactTag, boolean blockNativeResponder);
|
||||
|
||||
void clearJSResponder();
|
||||
|
||||
/**
|
||||
* Used by native animated module to bypass the process of updating the values through the shadow
|
||||
* view hierarchy. This method will directly update native views, which means that updates for
|
||||
|
||||
@@ -559,12 +559,19 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJSResponder(int reactTag, boolean blockNativeResponder) {
|
||||
/**
|
||||
* Set the JS responder for the view associated with the tags received as a parameter.
|
||||
*
|
||||
* @param reactTag React tag of the first parent of the view that is NOT virtual
|
||||
* @param initialReactTag React tag of the JS view that initiated the touch operation
|
||||
* @param blockNativeResponder If native responder should be blocked or not
|
||||
*/
|
||||
@DoNotStrip
|
||||
public void setJSResponder(
|
||||
final int reactTag, final int initialReactTag, final boolean blockNativeResponder) {
|
||||
// do nothing for now.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearJSResponder() {
|
||||
// do nothing for now.
|
||||
}
|
||||
|
||||
@@ -650,13 +650,11 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
mUIImplementation.viewIsDescendantOf(reactTag, ancestorReactTag, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactMethod
|
||||
public void setJSResponder(int reactTag, boolean blockNativeResponder) {
|
||||
mUIImplementation.setJSResponder(reactTag, blockNativeResponder);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactMethod
|
||||
public void clearJSResponder() {
|
||||
mUIImplementation.clearJSResponder();
|
||||
|
||||
Reference in New Issue
Block a user