Ticket #1198 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

[patch] Xinha width and height miscalculated when very small.

Reported by: guest Owned by: gogo
Priority: normal Milestone: 0.96
Component: Xinha Core Version:
Severity: minor Keywords:
Cc:

Description

Basically (in sizeEditor()), the objects inside the htmlArea object cause the explicit size set to be ignored (treating it more like a minimum size). So a call to htmlArea.offsetHeight or Width is not guaranteed to return the same value as was set to the htmlArea earlier in the routine.

In order to get it working for right now I make the iframe display none when asking for the dimensions of htmlArea. This isn't the best fix.

This affects IE7 and FF2/3 at the least. I have not tested other browsers.

Make an editor and set the sizes to 150px/150px to test. I used Xinha 0.95rc2.

Attachments

xinha.html (2.1 kB) - added by guest 4 years ago.
sizeEditor bug Example
xinha_sizeEditor_fix.diff (0.5 kB) - added by guest 4 years ago.
sizeEditor bugfix

Change History

Changed 5 years ago by ray

  • severity changed from normal to minor
  • milestone changed from 0.95 to 0.96

Changed 4 years ago by guest

sizeEditor bug Example

Changed 4 years ago by guest

sizeEditor bugfix

Changed 4 years ago by guest

  • summary changed from Xinha width and height miscalculated when very small. to [patch] Xinha width and height miscalculated when very small.

I stumbled over the same problem today.

I've attached a minimal example which demonstrates the problem, and a patch which fixes the problem.

Changed 4 years ago by gogo

  • status changed from new to closed
  • resolution set to fixed

This patch is applied in changeset:1200 - it seems harmless enough.

Note: See TracTickets for help on using tickets.