【问题标题】:Ionic Input Duplicating and Transforming on Click?点击时离子输入复制和转换?
【发布时间】:2018-10-16 12:16:25
【问题描述】:

我有一个带有离子输入的项目。出于某种原因,单击时应用了 css 转换来复制输入。是什么导致了这种情况发生,我该如何解决它以使其不显示?

下面的 gif 是 chrome,但我可以在物理 android 设备上复制它。

输入的html:

<ion-input placeholder="Guess" type="{{keyboardType}}" pattern="\\d*" maxlength="{{answerLength}}" clear-input class="guess-input" [(ngModel)]="guess" (keyup.enter)="submitGuess()"></ion-input>

自定义 CSS 类:(我刚刚添加了 transform: none 来尝试解决问题,但是由于将转换设置为元素样式,它不起作用。)

.guess-input{
        margin: 10px 1% 0 0;
        width: 80%;
        background-color: white;
        border: 1.5px solid black;
        transform: none;
        display: inline-block;
        height: 40px;
        border-radius: 5px;
    }

【问题讨论】:

    标签: html css ionic-framework ionic3


    【解决方案1】:

    我有多个平台,我正在修复它..

    我把 app.component.ts:

    constructor(
                    ...
                    public config: Config,
            ) {
                    // all platforms
            this.config.set( 'scrollPadding', false )
            this.config.set( 'scrollAssist', false )
            this.config.set( 'autoFocusAssist', false )
            // android
            this.config.set( 'android', 'scrollAssist', true )
            this.config.set( 'android', 'autoFocusAssist', 'delay' )
               ...
    

    也许它会对某人有所帮助。

    【讨论】:

      猜你喜欢
      • 2019-07-02
      • 2017-10-03
      • 2021-11-02
      • 2018-03-24
      • 1970-01-01
      • 1970-01-01
      • 2020-10-18
      • 1970-01-01
      • 2018-07-31
      相关资源
      最近更新 更多