Summary
On v2.0.0 / v2.0.1, the iOS paste interception silently fails to register on RN 0.76+ with the New Architecture (Fabric) enabled. The Edit Menu / QuickType "Paste" / long-press → Paste actions fall through to the default UITextView paste handler, which does nothing for image-only clipboard contents — making it look like nothing happens on paste.
Root cause
PasteInputIOSComponent reads the React Native tag via the __nativeTag property (double underscore):
// src/PasteInput.tsx
const nativeTag = textInputRef.current?.__nativeTag;
if (!nativeTag) {
if (__DEV__) {
console.warn('[PasteInput] Could not get native tag from ref');
}
return;
}
That property name is from the legacy renderer. Under Fabric (RN ≥ 0.76 with RCT_NEW_ARCH_ENABLED=1), the renderer exposes the tag as _nativeTag (single underscore) on the component instance — see e.g. react-native@0.83.6 Libraries/Renderer/implementations/ReactNativeRenderer-prod.js line ~1372:
var tag = inst._nativeTag;
So on Fabric textInputRef.current?.__nativeTag is undefined, the useEffect bails before calling NativePasteInputModule.registerTextInput, and the native module never attaches its paste: swizzle to the underlying UITextView. In __DEV__ this surfaces as the [PasteInput] Could not get native tag from ref console warning; in release builds it's a silent no-op.
Repro
- RN ≥ 0.76 with new arch on (
RCT_NEW_ARCH_ENABLED=1)
- v2.0.0 or v2.0.1 installed
- Mount a
<PasteInput onPaste={...} /> and focus it
- Copy an image to the clipboard (host macOS → iOS Simulator works;
public.png on the pasteboard)
- Tap the system Paste affordance — no
onPaste event fires; no JS callback; in DEV the warning prints once at mount
Confirmed on RN 0.83.6 + Expo 55.0.16 + new arch enabled.
Suggested fix
Use findNodeHandle from react-native, which is the public API and works across both legacy and Fabric (returns the underlying _nativeTag on Fabric):
import { findNodeHandle } from 'react-native';
const nativeTag = textInputRef.current
? findNodeHandle(textInputRef.current)
: null;
findNodeHandle is a thin wrapper around the same renderer-internal tag lookup, just with the correct property name per renderer.
Happy to send a PR.
Workaround
For anyone hitting this before a fix lands, a patch-package / pnpm patch diff against lib/commonjs/PasteInput.js and lib/module/PasteInput.js swapping textInputRef.current?.__nativeTag for findNodeHandle(textInputRef.current) (with the import added in lib/module/PasteInput.js) restores paste interception.
Summary
On v2.0.0 / v2.0.1, the iOS paste interception silently fails to register on RN 0.76+ with the New Architecture (Fabric) enabled. The Edit Menu / QuickType "Paste" / long-press → Paste actions fall through to the default UITextView paste handler, which does nothing for image-only clipboard contents — making it look like nothing happens on paste.
Root cause
PasteInputIOSComponentreads the React Native tag via the__nativeTagproperty (double underscore):That property name is from the legacy renderer. Under Fabric (RN ≥ 0.76 with
RCT_NEW_ARCH_ENABLED=1), the renderer exposes the tag as_nativeTag(single underscore) on the component instance — see e.g.react-native@0.83.6Libraries/Renderer/implementations/ReactNativeRenderer-prod.jsline ~1372:So on Fabric
textInputRef.current?.__nativeTagisundefined, theuseEffectbails before callingNativePasteInputModule.registerTextInput, and the native module never attaches itspaste:swizzle to the underlyingUITextView. In__DEV__this surfaces as the[PasteInput] Could not get native tag from refconsole warning; in release builds it's a silent no-op.Repro
RCT_NEW_ARCH_ENABLED=1)<PasteInput onPaste={...} />and focus itpublic.pngon the pasteboard)onPasteevent fires; no JS callback; in DEV the warning prints once at mountConfirmed on RN 0.83.6 + Expo 55.0.16 + new arch enabled.
Suggested fix
Use
findNodeHandlefromreact-native, which is the public API and works across both legacy and Fabric (returns the underlying_nativeTagon Fabric):findNodeHandleis a thin wrapper around the same renderer-internal tag lookup, just with the correct property name per renderer.Happy to send a PR.
Workaround
For anyone hitting this before a fix lands, a
patch-package/pnpm patchdiff againstlib/commonjs/PasteInput.jsandlib/module/PasteInput.jsswappingtextInputRef.current?.__nativeTagforfindNodeHandle(textInputRef.current)(with the import added inlib/module/PasteInput.js) restores paste interception.