File tree Expand file tree Collapse file tree 5 files changed +13
-9
lines changed
ReactCommon/react/renderer/components/textinput/iostextinput Expand file tree Collapse file tree 5 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -576,12 +576,14 @@ export interface TextInputProps
576576 /**
577577 * Allows to adjust caret height.
578578 * The default value is 0, which means the height of the caret will be calculated automatically
579+ * @platform ios
579580 */
580581 caretHeight ?: number | undefined ;
581582
582583 /**
583- * Allows to adjust caret postiion relative to the Y axis
584+ * Allows to adjust caret position relative to the Y axis
584585 * The default value is 0.
586+ * @platform ios
585587 */
586588 caretYOffset ?: number | undefined ;
587589
Original file line number Diff line number Diff line change @@ -560,12 +560,14 @@ export type Props = $ReadOnly<{|
560560 /**
561561 * Allows to adjust caret height.
562562 * The default value is 0, which means the height of the caret will be calculated automatically
563+ * @platform ios
563564 */
564-
565565 caretYOffset ?: ?number ,
566+
566567 /**
567- * Allows to adjust caret postiion relative to the Y axis
568+ * Allows to adjust caret position relative to the Y axis
568569 * The default value is 0.
570+ * @platform ios
569571 */
570572 caretYHeight ?: ?number ,
571573
Original file line number Diff line number Diff line change @@ -371,12 +371,14 @@ type IOSProps = $ReadOnly<{|
371371 /**
372372 * Allows to adjust caret height.
373373 * The default value is 0, which means the height of the caret will be calculated automatically
374+ * @platform ios
374375 */
375376 caretYOffset ?: ?number ,
376377
377378 /**
378- * Allows to adjust caret postiion relative to the Y axis
379+ * Allows to adjust caret position relative to the Y axis
379380 * The default value is 0.
381+ * @platform ios
380382 */
381383 caretHeight ?: ?number ,
382384| } > ;
@@ -1470,8 +1472,6 @@ function InternalTextInput(props: Props): React.Node {
14701472 selection = { selection }
14711473 style = { style }
14721474 text = { text }
1473- caretYOffset = { props . caretYOffset }
1474- caretHeight = { props . caretHeight }
14751475 />
14761476 ) ;
14771477 } else if ( Platform . OS === 'android' ) {
Original file line number Diff line number Diff line change @@ -339,10 +339,11 @@ - (CGRect)caretRectForPosition:(UITextPosition *)position
339339 originalRect.origin .y += _caretYOffset;
340340 }
341341
342- if (_caretHeight != 0 ) {
342+ if (_caretHeight != 0 ) {
343343 originalRect.size .height = _caretHeight;
344344 }
345- return originalRect;
345+
346+ return originalRect;
346347}
347348
348349- (NSArray *)selectionRectsForRange : (UITextRange *)range {
Original file line number Diff line number Diff line change @@ -160,7 +160,6 @@ class TextInputTraits final {
160160 * iOS-only (inherently iOS-specific)
161161 * Default value: 0 with a default font.
162162 */
163-
164163 int caretHeight{0 };
165164
166165 /*
You can’t perform that action at this time.
0 commit comments