2013-02-27 74 views
0

这是Google Chrome(版本25.0.1364.97米)中的错误吗? ...它在Safari中的行为如预期将图像拖放到contenteditable div中的文本上会删除chrome中的第一个字母?

如果您第一次拖动&将某些文本拖放到contenteditable div ....后来拖动&将图像或任何元素拖放到该文本中...并不总是但经常。 ..如果你在一个单词的第一个字母之前立即删除obj ...该信被删除...

有什么想法吗? ...这里的示例代码...

<!DOCTYPE HTML> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
</head> 
<body> 
Is this a Bug in Chrome ?<br><br> 
<div id="main" contenteditable="true" style="border:solid 1px black; width:300px; height:300px" spellcheck="false" ></div> 
<br><br> 


Select some text and drag it into the contenteditable box ...<br><br> 

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's built and run by you as part of the Stack Exchange network of Q&A sites. With your help, we're working together to build a library of detailed answers to every question about programming. 
We're a little bit different from other sites. Here's how:<br><br> 

Then drag and drop an image into the text ... 

<img width="50px" src="http://www.gravatar.com/avatar/f7b22b86b0da570ddb5d1d4923b0f4f4" alt=""> 
<img width="50px" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTmjD0kayL4VTZqfYDNavlQuNvOaBd4o4HjrnNlgbNhUfVy5QfrLg" alt=""> 

and drag and drop it around ...<br><br> 
If you drop it right before the first letter of a word ... often it deletes that first letter in Chrome ???<br><br> 

Any Ideas ? 

</body> 
</html> 

回答

0

捕获相同的错误。
我不知道它是否是Chrome的bug,但这里是我的解决方法:尝试将<范围内的每个单词放在句子>中。
它帮助了我!

相关问题