fixed #10739: Textarea and Codearea resize don't work in IE or Webkit browsers
This commit is contained in:
parent
1704618d6b
commit
56cdc103c2
3 changed files with 16 additions and 3 deletions
|
|
@ -151,7 +151,7 @@ sub toHtml {
|
|||
$style->setScript($url->extras('editarea/edit_area/edit_area_full.js'), {type=>"text/javascript"});
|
||||
my $out = <<"END_HTML";
|
||||
<div id="${id}_resizewrapper" style="padding-right: 6px; padding-bottom: 6px; margin-bottom: 1em; width: ${width}px; height: ${height}px">
|
||||
<textarea id="$id" name="$name" $extras rows="#" cols="#" style="font-family: monospace; $styleAttr; height: 100%; width: 100%;">$value</textarea>
|
||||
<textarea id="$id" name="$name" $extras rows="10" cols="60" style="font-family: monospace; $styleAttr; height: 100%; width: 100%; resize: none;">$value</textarea>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
|
|
@ -165,6 +165,13 @@ sub toHtml {
|
|||
display : 'later',
|
||||
toolbar : 'search,go_to_line,|,undo,redo,|,syntax_selection,highlight,reset_highlight,|,help'
|
||||
});
|
||||
resize.on('resize', function(e) {
|
||||
YAHOO.util.Dom.setStyle('${id}', 'width', resize.getStyle('width'));
|
||||
YAHOO.util.Dom.setStyle('${id}', 'height', resize.getStyle('height'));
|
||||
YAHOO.util.Dom.setStyle('frame_${id}', 'width', resize.getStyle('width'));
|
||||
YAHOO.util.Dom.setStyle('frame_${id}', 'height', resize.getStyle('height'));
|
||||
});
|
||||
resize.reset();
|
||||
})();
|
||||
</script>
|
||||
END_HTML
|
||||
|
|
|
|||
|
|
@ -149,9 +149,9 @@ sub toHtml {
|
|||
. ' name="' . $self->get("name") . '"'
|
||||
. ( $self->get("maxlength") ? ' maxlength="' . $self->get( "maxlength" ) . '"' : '' )
|
||||
. ' ' . $self->get("extras")
|
||||
. ' rows="#" cols="#"'
|
||||
. ' rows="5" cols="60"'
|
||||
. ' style="' . $self->get('style')
|
||||
. ( $self->get("resizable") ? ' height: 100%; width: 100%' : $sizeStyle ) . '"'
|
||||
. ( $self->get("resizable") ? ' height: 100%; width: 100%; resize: none;' : $sizeStyle ) . '"'
|
||||
. '>' . $value . '</textarea>';
|
||||
|
||||
if ($self->get("resizable")) {
|
||||
|
|
@ -163,6 +163,11 @@ sub toHtml {
|
|||
<script type="text/javascript">
|
||||
(function() {
|
||||
var resize = new YAHOO.util.Resize('%1$s_resizewrapper');
|
||||
resize.on('resize', function(e) {
|
||||
YAHOO.util.Dom.setStyle('%1$s', 'width', resize.getStyle('width'));
|
||||
YAHOO.util.Dom.setStyle('%1$s', 'height', resize.getStyle('height'));
|
||||
});
|
||||
resize.reset();
|
||||
})();
|
||||
</script>
|
||||
END_HTML
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue