當創建一個InputSurface時,我無法獲得各種屬性的工作,如自動對焦或maxLength。屬性與famo.us
this.email = new InputSurface({
classes: ['login-form'],
content: '',
size: [300, 40],
placeholder:'email',
properties: {
autofocus:'autofocus',
maxLength:'5',
textAlign: 'left'
}
});
呈現的div缺少我設置的屬性。
<input class="famous-surface login-form" placeholder="email" type="text" name="" style="-webkit-transform-origin: 0% 0%; opacity: 0.999999; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 614.5, 273.5, 0, 1); text-align: left; width: 300px; height: 40px;">
顯然,對於5個電子郵件一個最大長度是愚蠢的,但我只是想看看它是否會工作,但我可以繼續遠遠超過5錄入,當表面呈現,它不集中。有任何想法嗎?我查看了示例/演示,但找不到使用這些屬性的任何一個或者自動聚焦的輸入表面。
好的,謝謝。現在黑客將最適合我,因爲我需要maxLength和自動對焦工作,這似乎不可能與CSS /屬性。 – sday