「contenteditable」タグに問題があります。これはFirefoxでのみ発生します。自分が作成している調査のタイトルと動的に作成された質問のタイトルをユーザーが変更できるようにしたい。それはIEとChromeでうまく動作しますが、Firefoxでは質問のタイトルを変更できません。ここでinnerHTMLを使用したFirefox contentEditable問題
は、それがクロムに 次のようになります。https://gyazo.com/f142c432fcd2994a5f254106d912ff11
とFirefoxの:(完全に正常に動作します)タイトルのhttps://gyazo.com/5e454710231dc5c957dc46358cf92cf0
コードが
<h3 id="surveyTitle" class="text_justify fi-page-edit" contenteditable="true">Survey title</h3>
とのためであります生成された質問
var questionDiv = document.createElement("div");
questionDiv.innerHTML = "<div class='large-12 columns mybold fi-page-edit' style='resize: none;' contenteditable='true' id='title"+questionNumber+"'>Question "+questionNumber+"</div> </br>";
var container = document.getElementById("viewForm");
container.appendChild(questionDiv);
container.appendChild(document.createElement("br"));
たぶん「viewFormは」無効フィールドセットであるので、それはです:
<form>
<fieldset disabled="disabled" id="viewForm">
</fieldset>
</form>
しかし、それは他のすべてのブラウザ上で動作するので、問題がどこにあるか、私は本当に見ていない...
Firebugでエラーが発生しました – ManiMuthuPandi
@ManiMuthuPandiいいえ、私はページを読み込んでも質問のタイトルをクリックしてもエラーはありません – Raytho