You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ddev (Jira)" <ji...@apache.org> on 2021/02/23 20:09:00 UTC

[jira] [Comment Edited] (OFBIZ-12184) Textarea fields do not expand when typing into them

    [ https://issues.apache.org/jira/browse/OFBIZ-12184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17289296#comment-17289296 ] 

ddev edited comment on OFBIZ-12184 at 2/23/21, 8:08 PM:
--------------------------------------------------------

I like your idea to add the "min" function. 

I'm open to your version.  First question is: it would still need the "window.onload" part so that the textareas were there by the time it ran, right?  (i put that there to prevent the the .js file executing everything before the page had textareas in it).

I can try it out, but doesn't "getElementById" get *one* element, with the *id* *name* textarea, instead of those elements that are of type textarea?

(Note: trying to load javascript in the middle of the page seems to create errors about violations of a content security policy)

 


was (Author: ddev):
I like your idea to add the "min" function. 

I'm open to your version.  First question is: it would still need the "window.onload" part so that the textareas were there by the time it ran, right?  (i but that there to prevent the the .js file executing everything before the page had textareas in it).

I can try it out, but doesn't "getElementById" get *one* element, with the *id* *name* textarea, instead of those elements that are of type textarea?

(Note: trying to load javascript in the middle of the page seems to create errors about violations of a content security policy)

 

> Textarea fields do not expand when typing into them
> ---------------------------------------------------
>
>                 Key: OFBIZ-12184
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12184
>             Project: OFBiz
>          Issue Type: Improvement
>            Reporter: ddev
>            Priority: Minor
>         Attachments: autoexpand-textarea.js
>
>
> When typing into a textarea field with a large number of lines, you often can only see 2 lines of text at a time. It would make sense to add it to the HTML specification, but for whatever reason that did not happen, so it must be done in javascript.
>  
> I am attaching a javascript file that includes one way of fixing it.  One way of loading this would be to include it via themes/common/widget/Themes.xml
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)