mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-22 11:16:55 +08:00
@@ -366,12 +366,12 @@ describe('components/TextInput', () => {
|
||||
);
|
||||
|
||||
// default selection is 0
|
||||
expect(inputDefaultSelection.node.selectionStart).toEqual(0);
|
||||
expect(inputDefaultSelection.node.selectionEnd).toEqual(0);
|
||||
expect(inputDefaultSelection.instance().selectionStart).toEqual(0);
|
||||
expect(inputDefaultSelection.instance().selectionEnd).toEqual(0);
|
||||
|
||||
// custom selection sets cursor at custom position
|
||||
expect(inputCustomSelection.node.selectionStart).toEqual(cursorLocation.start);
|
||||
expect(inputCustomSelection.node.selectionEnd).toEqual(cursorLocation.end);
|
||||
expect(inputCustomSelection.instance().selectionStart).toEqual(cursorLocation.start);
|
||||
expect(inputCustomSelection.instance().selectionEnd).toEqual(cursorLocation.end);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
// top-level API
|
||||
findNodeHandle,
|
||||
hydrate,
|
||||
render,
|
||||
unmountComponentAtNode,
|
||||
|
||||
@@ -67,6 +68,7 @@ import {
|
||||
const ReactNative = {
|
||||
// top-level API
|
||||
findNodeHandle,
|
||||
hydrate,
|
||||
render,
|
||||
unmountComponentAtNode,
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ export { default as createElement } from './modules/createElement';
|
||||
export { default as findNodeHandle } from './modules/findNodeHandle';
|
||||
export { default as NativeModules } from './modules/NativeModules';
|
||||
export { default as processColor } from './modules/processColor';
|
||||
export { render, unmountComponentAtNode } from 'react-dom';
|
||||
export { hydrate, render, unmountComponentAtNode } from 'react-dom';
|
||||
|
||||
// APIs
|
||||
export { default as Animated } from './apis/Animated';
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
// based on https://github.com/facebook/react/pull/4303/files
|
||||
|
||||
import EventPluginHub from 'react-dom/lib/EventPluginHub';
|
||||
import normalizeNativeEvent from '../normalizeNativeEvent';
|
||||
import ResponderEventPlugin from 'react-dom/lib/ResponderEventPlugin';
|
||||
import ResponderTouchHistoryStore from 'react-dom/lib/ResponderTouchHistoryStore';
|
||||
import ReactDOM from 'react-dom';
|
||||
import ReactDOMUnstableNativeDependencies from 'react-dom/unstable-native-dependencies';
|
||||
|
||||
const { EventPluginHub } = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
const { ResponderEventPlugin, ResponderTouchHistoryStore } = ReactDOMUnstableNativeDependencies;
|
||||
|
||||
const topMouseDown = 'topMouseDown';
|
||||
const topMouseMove = 'topMouseMove';
|
||||
|
||||
Reference in New Issue
Block a user