Opened 9 years ago

Closed 7 years ago

#1198 closed defect (fixed)

[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 (2)

xinha.html (2.1 KB) - added by guest 8 years ago.
sizeEditor bug Example
xinha_sizeEditor_fix.diff (525 bytes) - added by guest 8 years ago.
sizeEditor bugfix

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by ray

  • Milestone changed from 0.95 to 0.96
  • Severity changed from normal to minor

Changed 8 years ago by guest

sizeEditor bug Example

Changed 8 years ago by guest

sizeEditor bugfix

comment:2 Changed 8 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.

comment:3 Changed 7 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.