Ticket #481 (closed Bug: fixed)

Opened 1 year ago

Last modified 3 months ago

FF: Image preview doesn't display

Reported by: bludo Assigned to: martinkou
Priority: Normal Milestone: FCKeditor 2.6
Component: General Version: FCKeditor 2.4.2
Keywords: Confirmed Review+ Cc:

Description

In firefox only, When you select an image in image manager , the height and width are set to 0 in preview . If you want to display you must click on refresh .

Attachments

481.patch (1.3 kB) - added by martinkou on 02/20/08 08:13:39.
481_2.patch (1.3 kB) - added by martinkou on 02/20/08 10:41:04.

Change History

05/26/07 11:59:36 changed by alfonsoml

  • keywords set to Pending.

Works fine for me in http://www.fckeditor.net/demo with Fx 2.0.0.3 , windows XP.

Please provide detailed steps to reproduce.

05/29/07 12:41:20 changed by bludo

I use Fc 2.0.0.3 and windows Xp and it an be reproducted on demo version.

1 click image button

2 click browse server .

3 upload a image

4 click on it

5 the image appear in preview then disappear with width and height postionned to '0'

05/30/07 17:22:36 changed by fredck

  • keywords changed from Pending to Pending Confirmed.

Partially confirmed with FF2.

It seams to happen only if the image is not in the cache, with images that are not too small, therefore taking some time to download in the preview window. No problem with small images.

In my tests, the dimension fields are not being set to 0, but remain blank. Also, the image in the preview doesn't disappear at all.

blodu, can you confirm that the bug is like I've described?

05/31/07 12:48:26 changed by bludo

Oh, the preview doesn't work as before, it's my fault , i have no cache with my FF ( a plugin FF) .

So it's not a bug, i close my case .

Sorry

06/03/07 16:35:22 changed by fredck

  • keywords changed from Pending Confirmed to Confirmed.
  • milestone set to FCKeditor 2.6.

Thanks for the update bludo. We still need to fix this one, as the fields remain blank, instead of getting the image sizes.

08/09/07 13:18:37 changed by saul11

It definitely seems to be having something to do with the cache. I'm using Firefox 2.0.0.6 + the Web developer add-on version 1.1.4. To reproduce, turn off the cache and open the image dialog (cache must be off before opening the dialog!), then browse server and select an image. Now (most of the time) for any image (also small images, with 6k being the smallest that I've tried) the width and height inputs are set to zero.

It seems to me that the onload function, that calls 'ResetSizes', set in UpdateOriginal is triggered before the width and hight of oImageOriginal are known (browser bug?). A fix that seems to be working is to add the code below, in function ResetSizes before its input populating code.

	if ( oImageOriginal.width == 0 || oImageOriginal.height == 0 ) {
		setTimeout(ResetSizes, 10) ;
		return ;
	}

02/07/08 17:21:28 changed by saul11

Not in the image manager, as that is a plugin, but in the standard image dialog.

This still happens in Firefox 2.0.0.11 using FCKeditor 2.5.1. Just by clicking 'Insert/edit image' > 'Browse server' > select an image. Again with the cache turned off, it happened most of the times.

02/20/08 08:13:39 changed by martinkou

  • attachment 481.patch added.

02/20/08 08:14:02 changed by martinkou

  • keywords changed from Confirmed to Confirmed Review?.
  • owner set to martinkou.
  • status changed from new to assigned.

02/20/08 10:35:22 changed by fredck

  • keywords changed from Confirmed Review? to Confirmed Review-.
  • summary changed from image preview does'nt display in firefox to FF: Image preview doesn't display.

The proposed patch may potentially put the dialog in a 10ms loop if the image sizes are really 0x0 (for an invalid image file, for example).

As this is a FF only issue, we could try to check oImageOriginal.complete instead, and than recall the function after 10ms.

If .complete will not work, then we should at least limit the number of retries to 10 (passing the counter as a parameter to the function).

02/20/08 10:41:04 changed by martinkou

  • attachment 481_2.patch added.

02/20/08 10:42:41 changed by martinkou

  • keywords changed from Confirmed Review- to Confirmed Review?.

Updated patch to use img.complete and increased the polling delay to 50ms for better performance.

02/20/08 13:12:44 changed by fredck

  • keywords changed from Confirmed Review? to Confirmed Review+.

02/21/08 03:47:36 changed by martinkou

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed with [1576].

Click here for more info about our SVN system.