ionic-framework - 离子输入点击进入文本奇怪的行为
问题描述
当我在其中单击时,我看到我的离子输入字段的一些非常奇怪的行为。我已经将它(不知道为什么)精确定位到父 div 中的 padding-top。我还注意到,如果我将文本缩减为 p 中的几个单词。关于为什么会发生这种情况或我该如何解决的任何想法?
。主要的
.main {
margin: 0 auto;
padding-left: 24px;
padding-right: 24px;
padding-top: 100px; // IF I REMOVE THIS, IT IS NORMAL
&.no-nav {
padding-top: 0px;
}
&.no-content {
:before {
content: '';
position: absolute;
height: 1px;
width: calc(100% - 48px);
border-bottom: 1px solid $surface-03;
top: 96px;
left: 24px;
}
}
&.top-nav {
padding-top: 24px;
}
}
模板代码
<ion-content>
<div class="main">
<ion-card>
<ion-card-content>
<p>a bunch of text here that seems to push the input box in click down, if i only put a few words here it doesn't behave like this which is odd</p>
<form [formGroup]="" novalidate>
<ion-item>
<ion-input
formControlName=""
required
inputmode="text"
placeholder="Click in me"
></ion-input>
<ion-icon class="edit-icon"></ion-icon>
</ion-item>
</form>
</ion-card-content>
</ion-card>
</div>
</ion-content>
这是行为
解决方案
推荐阅读
- android - Flutter 停止在真机上安装项目
- wordpress - 如何在 WooCommerce POS 插件中显示特定类别的特色产品?
- flutter - NestedScrollView 内部不尊重正文大小和边距
- javascript - Nx Storybook Webpack“开发”模式
- node.js - TypeError:passport.authenticate 不是函数
- sql - 计算其成员资格即将到期的所有用户的存储过程
- slurm - SLRUM:如何限制 CPU 作业数以避免浪费 GPU 资源
- websphere - 从 z/OS 到 Kafka 使用哪个 IBM CDC Engine
- javascript - 我遇到的错误是:无法读取未定义的属性“forEach”
- android - 无法在清单中同时设置值为 1337 的即时应用元数据标记和应用链接