开发者

Pasting into Webkit textarea gets capped when body has text-transform: uppercase

I have...

body { text-transform: uppercase; }

...and...

textarea { text-transform: none !important; }

Text pasted into a textarea in Webkit (Safari and Chrome) will get capitalized. Text pasted into a textarea in Firefox or IE will be left as it was, lower or capped. I need it to be left alone in all browsers for SQL.

Bu开发者_开发问答g? Fixes?


You're likely to have a single element wrapping all content or perhaps a small number of them. I've found that the top-most element having text-transform: uppercase does not cause pasted text in WebKit to become upper case.

E.g. instead of:

body { text-transform: uppercase; … }

Use:

body { … }
#header, #content {text-transform: uppercase}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜