简体   繁体   English

来自 SMS 密码的 iOS 自动填充在 Flutter Web 上不起作用

[英]iOS Autofill from SMS passcodes not working on flutter web

According to this page iOS can read the sms codes and offer it on top of keyboard.根据this page iOS可以读取短信代码并将其提供在键盘顶部。

I use a package in my flutter app, that adds autofill=oneTimeCode in my input.我在我的颤振应用程序中使用了一个包,它在我的输入中添加了 autofill=oneTimeCode。

It works well on the iOS native app export, but not works on flutter web export, what's the problem?它适用于 iOS 原生应用程序导出,但不适用于 Flutter Web 导出,这是什么问题?

在此处输入图像描述

I also checked the html code that exported by flutter, and there is autocomplete="one-time-code" here:我还检查了flutter导出的html代码,这里有autocomplete="one-time-code"

<input name="one-time-code" id="one-time-code" type="text" autocomplete="one-time-code" autocorrect="off" class="flt-text-editing transparentTextEditing" style="white-space: pre-wrap; align-content: center; position: absolute; top: 0px; left: 0px; padding: 0px; opacity: 1; color: transparent; background: transparent; outline: none; border: none; resize: none; overflow: hidden; transform-origin: 0px 0px 0px; caret-color: transparent; text-align: center; font: 1px On, Arial, sans-serif; width: 290px; height: 1px; transform: matrix(1, 0, 0, 1, 50.2, 221.5);">

I do not understand what's the problem我不明白有什么问题

Is there any way to change type="text" to type="tel" or type="number" in the exported html code by flutter?有没有办法通过flutter将导出的html代码中的type="text"更改为type="tel"type="number"

Update: This is a known bug, and flutter team will fix this soon.更新:这是一个已知的错误,Flutter 团队将很快修复此问题。 https://github.com/flutter/flutter/issues/104693 https://github.com/flutter/flutter/issues/104693

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM