Opened 6 years ago

Closed 12 months ago

# WYSIWYG editor doesn't resize

Reported by: Owned by: Vladimir Kocjancic Jun Omae normal TracWysiwygPlugin normal 0.12

### Description

Hi,

We have encountered a problem, where textarea for input or edit (in either tickets or wiki) cannot be re-sized. What makes it worse is that in 0.12, textarea by default is oly about 8 rows high, which makes it nigh impossible to edit wiki pages with WYSIWYG. As a workaround, I tried to expand the field in textarea mode, but it goes back to default size at the exact moment you switch to wysiwyg mode.

Same goes for modifying tickets. wysiwyg editor input area is about 0 pixels high.

### comment:1 Changed 13 months ago by anonymous

Hi, We have recently updated Trac to 1.0.13 and the TracWysiwyg to version 0.12.0.6. and have experienced similar problems. We have identified a workaround to make the text area taller (but NOT wider).

• Switch to textarea view
• increase the vertical size via the bottom center resize handle (but not the horizontal size)
• switch back to wysiwyg view.

Sadly, any attempt to increase the horizontal size reverts the view to the default size when switching the wysiwyg.

Can you provide any update on the status of this issue? (BTW - We use WYSIWYG mode extensively and can't help but feel amazed at how much works naturally, so thanks much!) Thanks!

### Changed 13 months ago by anonymous

Attachment: vertical handle hidden.png​ added

### comment:2 Changed 13 months ago by anonymous

Hi again, We just noticed the vertical handle is present on the wysiwyg view but is very small. The handle is bottom left of the text area. See attached. No luck finding the horizontal control.

### comment:3 Changed 13 months ago by Jun Omae

What browser are you using?

### comment:4 Changed 13 months ago by charles.butterfield@…

I'm on the same project as the anonymous coward (Wayne) who reported this problem. Some addtional data

• My (Charlie) browser = Firefox 54.0.1 64-bit
• The issue we see is when MODIFYING a ticket description. During initial creation, and in other areas such as Wiki pages, the WYSIWYG editor has an obvious vertical resize handle. Sorry we forgot to include this key point.

### comment:5 Changed 13 months ago by Jun Omae

Status: new → accepted

Thanks for the details. Could you please try the following patch?

• ## tracwysiwygplugin/0.12/tracwysiwyg/htdocs/wysiwyg.js

diff --git a/tracwysiwygplugin/0.12/tracwysiwyg/htdocs/wysiwyg.js b/tracwysiwygplugin/0.12/tracwysiwyg/htdocs/wysiwyg.js
index fab974c1e..f1cf09c17 100644
 a prototype.createEditable = function(d, textarea, textareaResizable) { var contentDocument = null; var grip = d.createElement("div"); grip.className = "trac-grip"; if (/^[0-9]+$/.exec(dimension.width)) { grip.style.width = dimension.width + "px"; }$(grip).bind("mousedown", beginDrag); wrapper.appendChild(grip); var resizable = d.createElement("div");

### comment:6 Changed 12 months ago by charles.butterfield@…

I just took a look at the exploded egg file wysiwyg.js and it seems to already have the change you indicate. Specifically it contains the following lines

        grip.className = "trac-grip";
if (/^[0-9]+$/.exec(dimension.width)) { grip.style.width = dimension.width + "px"; }$(grip).bind("mousedown", beginDrag);


FYI, on my system the file is found at /data1/cen/proj/tracdb/projects/.egg-cache/TracWysiwyg-0.12.0.6-py2.7.egg-tmp/tracwysiwyg/htdocs/wysiwyg.js - is that roughy what you would expect? (the tail end not the beginning of the file path).

### comment:7 Changed 12 months ago by Jun Omae

Resolution: → fixed accepted → closed

In 16729:

TracWysiwyg/0.12.0.7: fix editor not resizable in collapsed ticket form (closes #9895)

### comment:8 follow-up:  9 Changed 12 months ago by charles.butterfield@…

I'm afraid my earlier comment was ambiguous. What I SHOULD have said was "my system already has your suggested patch BUT I still have the problem".

Is there something else I can provide you to figure out what is going wrong? Should I have one of my GUI experts take a look at the actual Javascript loaded into the browser using the Firefox debugger?

### comment:9 in reply to:  8 Changed 12 months ago by Jun Omae

I'm afraid my earlier comment was ambiguous. What I SHOULD have said was "my system already has your suggested patch BUT I still have the problem".

No. my system already has your suggested patch is incorrect. In [16729], I've removed 3 lines.

### comment:10 Changed 12 months ago by anonymous

Oh sorry! I thought you ADDED those 3 lines as a fix. Okay, I'll remove them on my system and retry. Assuming the fix works, any idea when it will be available for download using the regular download mechanisms?

### comment:11 Changed 12 months ago by Jun Omae

Browser sometimes is caching old wysiwyg.js file. Then, try force reload (SHIFT-F5).

### comment:12 Changed 12 months ago by anonymous

I tested your new 0.12.0.7 version and it works great. Thanks for all your hard work!

### comment:13 Changed 12 months ago by charles.butterfield@…

Previous comment by me (Charlie B)

### Modify Ticket

Change Properties