GM5810 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
0 stars 0 forks source link

Width increases incrementally with each additional implementation per page. #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the editor on multiple text fields on one page.
2.
3.

What is the expected output? What do you see instead?
When the WYSIWYG function is applied to multiple textareas on one page, the
inline width of the .wysiwyg div is increased incrementally. (screenshot
attached)

What version of the product are you using? On what operating system?
Current version, tested on Firefox and IE 7.

Please provide any additional information below.
The problem is easily worked around by changing this:

this.element = $('<div></div>').css({
                width : ( newX > 0 ) ? ( newX ).toString() + 'px' : '100%'
            })

To this: 

this.element = $('<div></div>').css({
                width : '100%'
            })

Or I suppose one could remove the width declaration altogether, setting the
width is really CSS's business.

Original issue reported on code.google.com by madmanl...@gmail.com on 5 Mar 2008 at 7:02

Attachments:

GoogleCodeExporter commented 9 years ago
I myself use 3 editors on the same page without having this problem. try 
putting each
editor in a separate div.

Original comment by N.Hen...@gmail.com on 6 Jan 2009 at 7:25

GoogleCodeExporter commented 9 years ago
I have a similar problem with this difference that the width doesn't increase, 
but is
decreased to 13px for every new textarea that is placed on the page. I clone the
textarea with jQuery so I suppose the script fails in determining the width & 
height
of the textarea.

Original comment by barcl...@gmail.com on 20 Apr 2009 at 2:02

GoogleCodeExporter commented 9 years ago
I have this problem too. I call textarea (and jwysiwyg) in a modal popup. When 
the
first modal popup shows up - everything is ok. In second one width of jwysiwyg 
is
increased.

Original comment by mkorin...@gmail.com on 12 Jan 2010 at 12:17

GoogleCodeExporter commented 9 years ago
Same issue as madmanlear reported when using this and Git repository.
If you are using this with JQuery Dialog with fixed width you have to change 
two things:

1. related to div container
change this:
<div></div>').css({width:(newX>0)?(newX).toString()+'px':'100%'
to this:
<div></div>').css({width:'100%'

2. related to iframe (fixed width 420 used with ui dialog)
change this:
width:(newX-8).toString()+'px'
to this:
width:420+'px'

Original comment by jedin...@gmail.com on 29 Apr 2010 at 9:22