Skip to content

Commit 8d4e2a1

Browse files
committed
fix: ios fix
1 parent 9724020 commit 8d4e2a1

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/textfield/textfield.ios.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ export class TextField extends TextFieldBase {
148148
}
149149

150150
// we need to override this from N as in MDC case the range is 0
151-
if (range.length > 0) {
152-
const delta = replacementString.length - range.length;
153-
if (delta > 0) {
154-
if (textField.text.length + delta > this.maxLength) {
155-
return false;
156-
}
151+
// if (range.length > 0) {
152+
const delta = replacementString.length - range.length;
153+
if (delta > 0) {
154+
if (textField.text.length + delta > this.maxLength) {
155+
return false;
157156
}
158157
}
158+
// }
159159

160160
if (this.updateTextTrigger === 'textChanged') {
161161
if (textField.secureTextEntry && this.firstEdit) {
@@ -179,18 +179,16 @@ export class TextField extends TextFieldBase {
179179
}
180180

181181
_getTextInsetsForBounds(insets: UIEdgeInsets): UIEdgeInsets {
182-
183182
const style = this.style;
184183

185-
186184
if (this.variant === 'underline' && this._controller.underlineHeightNormal === 0) {
187185
// if no underline/custom background, remove all insets like on android
188186
insets.top = 0;
189187
insets.bottom = 0;
190188
}
191189

192190
if (paddingTopProperty.isSet(style)) {
193-
insets.top = Utils.layout.toDeviceIndependentPixels( this.effectivePaddingTop);
191+
insets.top = Utils.layout.toDeviceIndependentPixels(this.effectivePaddingTop);
194192
}
195193
if (paddingRightProperty.isSet(style)) {
196194
insets.right = Utils.layout.toDeviceIndependentPixels(this.effectivePaddingRight);

0 commit comments

Comments
 (0)