Project

General

Profile

Actions

Bug #5391

closed

WTextEdit (TinyMCE 4) in layout gets excessive height under certain conditions

Added by Bruce Toll over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/02/2016
Due date:
% Done:

0%

Estimated time:

Description

With github Wt 3.3.6-6-gbadb151, a WTextEdit configured to use TinyMCE 4 in a layout can receive an excessive height and extend beyond its layout container. This issue can be observed with Chrome 54 (Windows 7) and the attached test program --- after clearing your browser cache. The issue appears to be timing related and occurs with the use of plugins and a cold browser cache. Once the TinyMCE plugins have been cached, the issue will no longer occur with a browser refresh.

The issue can also be driven by introducing a communication delay with W7 FireFox 49.0.2 and W7 IE 11. With the server delay in place (and a clear browser cache), the issue should be visible on the first access to the test web app with both Firefox and IE.

For testing on a Linux server, I used the following command to introduce a 500ms delay:

tc qdisc add dev eth0 root netem delay 500ms

...and the following command to revert the delay after testing...

tc qdisc del dev eth0 root

As a workaround, it may be possible to build TinyMCE 4 with all of the required plugins bundled, although I have not tested this.

It seems that TinyMCE 4 does not complete the layout/sizing of its component divs and iframe prior to loading all plugins, although it reports that initializaton is complete. I could not find documentation for a public interface that provides an indication of when these sizes are completely initialized.

Attached, for your review, is a patch that adds retry logic for the specific case when the WTextEdit.js calculated height for the iframe is negative, indicating that the vertical element heights may not have been completely initialized by TinyMCE. In limited testing, the patch seems to help with the cold cache TinyMCE plugin issue with Chrome, Firefox and IE. The patch has not been tested with TinyMCE 3.


Files

Actions #1

Updated by Roel Standaert over 7 years ago

  • Status changed from New to InProgress
  • Assignee set to André Jacobs
Actions #2

Updated by André Jacobs over 7 years ago

  • Status changed from InProgress to Implemented @Emweb
Actions #3

Updated by Roel Standaert over 7 years ago

  • Status changed from Implemented @Emweb to Resolved
Actions #4

Updated by Roel Standaert about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF