爲什麼在contentEditable文檔中,換行顯示爲空格或在Opera的Enter/Return鍵中消失?爲什麼換行符會變成空格或在Opera中爲contentEditable文檔消失?
試試這個演示:
<!DOCTYPE html>
<html>
<head>
<title>contentEditable demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body contenteditable="true" spellcheck="true" dir="ltr">
<h1>Welcome to the contentEditable demo!</h1><p><span style="font-size: xx-large">
Try<span style="font-size: small">to type some text before the word "Try". You will see that random spaces are inserted before the word. Press Enter; you will see that the newline on the top disappears.</span></span></p></body>
</html>
戲曲11.50生成1074在Windows Vista上
這是一個Opera的bug?我沒有經歷過這個bug與Windows Internet Explorer 8中,Safari瀏覽器,谷歌Chrome或Firefox 5