javascript - How to determine the dimensions of textareas with scrollbars in Chrome -
i want determine width of textarea according content-box model. since offsetwidth
property larger due padding , borders, utilize getcomputedstyle()
, works fine in firefox 33 , opera 12.
for testing, i've set width: 400px;
textarea, vertical scrollbar appears, chrome 38 gives me width of 383px
in respond getcomputedstyle()
. width of content-box without scrollbar, not defined width.
that not limited textareas, applies every scrollable element.
two questions:
is right behaviour or bug? how can determine right width of content-box? javascript html google-chrome
No comments:
Post a Comment