论坛: ヘルプ (Thread #36828)

textareaの自動折り返し (2015-05-28 10:54 by akawamoto #76240)

お世話になります。
先日アップしてもらった6.2.4.1を使っているのですが、
5.8.1.1を使っていたときには端までの入力で自動折り返ししていたtextareaの入力が折り返さず、改行を入力するまで改行しなくなりました。

何か仕様がかわって指定する必要が増えたのでしょうか?

opengion\uap\webapps\jn\WEB-INF\lib
のjarファイルを変えると、同じコードで自動折り返しできます。

<og:columnEditor column="MOKUHYO" renderer="TEXTAREA" editor= "TEXTAREA" param="3,25" />
としたて設定項目を
↓以下のView内で入力状態で使った場合です。
<og:view
viewFormType = "HTMLCustomTable"
command = "{@command}"
columnWritable = "{@columnWritable}"
noDisplay = "{@noDisplay}"
startNo = "{@startNo}"
pageSize = "{@pageSize}"
noMessage = "true"
rowspan = "1"
numberType = "delete"
bgColorCycle = "0"
useScrollBar = "false"
>
viewの外では普通にtextareaの端で自動折り返ししました。

uap\webapps\jn\jsp\common
以下のjs、JSPを5.8.1の中身に置き換えてみただけでは、自動折り返ししてくれませんでした。
自作した画面の中でjavascriptでtextareaの属性を書き換えて対応してみようとしたのですが、それもダメでした。

libの中のjarファイルのみを置き換えたら、状態が変化しました。

よろしくお願いします。

回复到 #76240×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: textareaの自動折り返し (2015-05-29 09:49 by chatrun #76249)

中間報告です。

とりあえず、テストしてみようと思い、
<og:columnEditor column="MOKUHYO" renderer="TEXTAREA" editor= "TEXTAREA" param="3,25" />
を入れてみました。
現象が、異なりますが、再現しました。

IE11 ネイティブモード
再現する。 (viewの枠外でも再現する) 折り返しません。
IE11 互換モード
(ツール → 互換表示設定 → 追加するサイト で追加)
折り返す。(view の枠外も同様に折り返す)

jarファイルの交換は、行っていませんが、ソースのHTMLを見る限り、
<td><textarea name="MOKUHYO__1" id="MOKUHYO__1" cols="25" rows="3" class="XK" ></textarea></td>
のようなソースが出力されているだけで、あとは、外部で、何かしているかどうかです。

# Ver5とVer6で、テキストフィールドのサイズと入力制限の関係は、少し変更しましたが、テキストエリアについては、変更したつもりがないので、よくわかりません。
回复到 #76240

回复到 #76249×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: textareaの自動折り返し (2015-05-29 13:34 by chatrun #76250)

[メッセージ #76249 への返信]
最終報告です。

どうも、textarea の上位の td タグの white-space: nowrap; が、textarea まで有効になっているようです。(ネイティブモードにすると)

textarea { white-space: normal; }

を入れると、改行して表示されます。

先に、こちらのテスト時に、view の外に出しても、同じ・・・というのは、外に出すときに、table タグで、囲っていたため、一覧表示と同様に、td タグの効果が継承されたようです。

標準としては、common/default.css に、textarea { white-space: normal; }
を入れます。

今すぐ対応されたい場合は、custom/custom.css に先の記述を入れれば、行けると思います。

ご確認ください。
回复到 #76249

回复到 #76250×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: textareaの自動折り返し (2015-05-29 15:50 by akawamoto #76251)

> 標準としては、common/default.css に、textarea { white-space: normal; }
> を入れます。
>
> 今すぐ対応されたい場合は、custom/custom.css に先の記述を入れれば、行けると思います。

custom.cssに記述を追加して、折り返しが出来ることを確認しました。

ありがとうございました!
回复到 #76250

回复到 #76251×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: textareaの自動折り返し (2015-06-02 09:04 by akawamoto #76264)

すいません、今頃・・・

custom.cssに教えていただいた通りにいれたら、自動折り返しは出来たのですが、今度はtextareaの内での改行が効かなくなってしまいました。。。
どうしたらいいでしょう???
回复到 #76251

回复到 #76264×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: textareaの自動折り返し (2015-06-02 19:00 by chatrun #76268)

[メッセージ #76264 への返信]
> custom.cssに教えていただいた通りにいれたら、自動折り返しは出来たのですが、今度はtextareaの内での改行が効かなくなってしまいました。。。

確認したところ、長い文章の初めの箇所では、手動改行が効きますが、後ろの方とか、短い文章の場合は、改行されず、スペースが入るだけのようです。

textarea { white-space: normal; }

の箇所を、

textarea { white-space: pre; }

にしてみてください。

# 長い文章で、自動/手動改行してたので、OK と思っていましたが、
# こういうケースもあるんですね。参考になります。

回复到 #76264

回复到 #76268×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: textareaの自動折り返し (2015-06-03 09:12 by akawamoto #76272)

↓にして、無事自動改行とEnter改行対応できました。
> textarea { white-space: pre; }

ありがとうございました m(_ _)m
回复到 #76268

回复到 #76272×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录