点击时离子输入复制和转换?

时间:2018-05-06 15:39:55

标签: html css ionic-framework ionic3

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

下面的gif是chrome,但我能够在物理Android设备上复制它。

enter image description here

输入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;
    }

1 个答案:

答案 0 :(得分:0)

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

我输入了app.component.ts:

// Simulate illumination up
let code = NX_KEYTYPE_ILLUMINATION_UP
let event1 = NSEvent.otherEvent(with: .systemDefined, location: NSPoint.zero, modifierFlags: NSEventModifierFlags(rawValue: 0xa00), timestamp: 0, windowNumber: 0, context: nil, subtype: 8, data1: (Int((code << 16 as Int32) | (0xa << 8 as Int32))), data2: -1)
event1?.cgEvent?.post(tap: .cghidEventTap)
let event2 = NSEvent.otherEvent(with: .systemDefined, location: NSPoint.zero, modifierFlags: NSEventModifierFlags(rawValue: 0xb00), timestamp: 0, windowNumber: 0, context: nil, subtype: 8, data1: (Int((code << 16 as Int32) | (0xb << 8 as Int32))), data2: -1)
event2?.cgEvent?.post(tap: .cghidEventTap)



// Simulate illumination down
let code = NX_KEYTYPE_ILLUMINATION_DOWN
let event1 = NSEvent.otherEvent(with: .systemDefined, location: NSPoint.zero, modifierFlags: NSEventModifierFlags(rawValue: 0xa00), timestamp: 0, windowNumber: 0, context: nil, subtype: 8, data1: (Int((code << 16 as Int32) | (0xa << 8 as Int32))), data2: -1)
event1?.cgEvent?.post(tap: .cghidEventTap)
let event2 = NSEvent.otherEvent(with: .systemDefined, location: NSPoint.zero, modifierFlags: NSEventModifierFlags(rawValue: 0xb00), timestamp: 0, windowNumber: 0, context: nil, subtype: 8, data1: (Int((code << 16 as Int32) | (0xb << 8 as Int32))), data2: -1)
event2?.cgEvent?.post(tap: .cghidEventTap)

也许对某人有帮助。