Copy-paste in textarea doesn't work in Chrome
I have a little mys开发者_运维技巧tery.
When you have a div { display: none; }
rule in your css, and a textarea
on the page, it is impossible to copy and paste in the textarea
in a Chrome browser.
What's going on?
http://pastehtml.com/view/ax3tuefz3.html
I tried and yes the paste seems to be broken in your example.
There were some bugs reported on chrome buglist:
http://code.google.com/p/chromium/issues/detail?id=60057
http://code.google.com/p/chromium/issues/detail?id=61784
But they are long closed.
This is a bug in WebKit.
I've filed a bug report here: https://code.google.com/p/chromium/issues/detail?id=86025
Your problem isdisplay:none;
is applying to all your div
s.
I gave your button a class
:
<div id="login" class="login">
And made sure the display:none;
only applied to it
div.login {
display: none;
}
Then I hid your form off the top
$('#view_form').hide();
Works now: http://jsbin.com/umugi5/3/
精彩评论