开发者

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

开发者 https://www.devze.com 2023-03-25 07:48 出处:网络
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.

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

精彩评论

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