html
1<div aria-multiline=true class=txt-area contenteditable=true id=dmComposerTextInput role=textbox spellcheck=true tabindex=0 > 2</div>
css
1.txt-area { 2 outline: none; 3 user-select: text; 4 white-space: pre-wrap; 5 overflow-wrap: break-word; 6 background: lightgray; 7 line-height: 30px; 8 font-size:20px; 9 max-height:90px; 10 width:400px; 11 border: 2px solid; 12 border-color: #1da1f2; 13 overflow-y:scroll 14}
js
1 var tBox = document.getElementById("dmComposerTextInput"); 2 tBox.addEventListener('input', function() { 3 if (tBox.innerText.length > 3) { 4 //TODO: 動作に影響はないがエラーになっているので時間ある時に修正する必要がある。 5 tBox.prop("contenteditable", false); 6 } 7 });
困っていること
テキストを入力し始めるとタイトルのようなエラーが表示される。
原因が分からなくて困っています。
意図している動作には、影響はないが、エラーが出ているということは何か原因があって起きていると思うのでなんかしたい。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/11/23 13:09