Opened 5 years ago

Closed 4 days ago

Last modified 4 days ago

#9895 closed defect (fixed)

WYSIWYG editor doesn't resize

Reported by: Vladimir Kocjancic Owned by: Jun Omae
Priority: normal Component: TracWysiwygPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12



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.

Attachments (1)

vertical handle hidden.png (6.6 KB) - added by anonymous 3 weeks ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 3 weeks ago by anonymous

Hi, We have recently updated Trac to 1.0.13 and the TracWysiwyg to version 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 3 weeks ago by anonymous

Attachment: vertical handle hidden.png added

comment:2 Changed 3 weeks 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 3 weeks ago by Jun Omae

What browser are you using?

comment:4 Changed 3 weeks 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 3 weeks ago by Jun Omae

Status: newaccepted

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 b prototype.createEditable = function(d, textarea, textareaResizable) { 
    273273        var contentDocument = null;
    274274        var grip = d.createElement("div");
    275275        grip.className = "trac-grip";
    276         if (/^[0-9]+$/.exec(dimension.width)) {
    277    = dimension.width + "px";
    278         }
    279276        $(grip).bind("mousedown", beginDrag);
    280277        wrapper.appendChild(grip);
    281278        var resizable = d.createElement("div");

comment:6 Changed 2 weeks 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)) {
   = dimension.width + "px";
        $(grip).bind("mousedown", beginDrag);

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

comment:7 Changed 4 days ago by Jun Omae

Resolution: fixed
Status: acceptedclosed

In 16729:

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

comment:8 Changed 4 days 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 4 days ago by Jun Omae

Replying to 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".

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

comment:10 Changed 4 days 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 4 days ago by Jun Omae

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.