#481 closed Bug (fixed)
FF: Image preview doesn't display
Reported by: | ludovic BODENES | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6 |
Component: | General | Version: | FCKeditor 2.4.2 |
Keywords: | Confirmed Review+ | Cc: | adv.seb@… |
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 (2)
Change History (18)
comment:1 Changed 18 years ago by
Keywords: | Pending added |
---|
comment:2 Changed 18 years ago by
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'
comment:3 Changed 18 years ago by
Keywords: | Confirmed added |
---|
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?
comment:4 Changed 18 years ago by
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
comment:5 Changed 18 years ago by
Keywords: | Pending removed |
---|---|
Milestone: | → 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.
comment:6 Changed 18 years ago by
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 ; }
comment:7 Changed 17 years ago by
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.
Changed 17 years ago by
comment:8 Changed 17 years ago by
Keywords: | Review? added |
---|---|
Owner: | set to Martin Kou |
Status: | new → assigned |
comment:9 Changed 17 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Summary: | image preview does'nt display in firefox → 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).
Changed 17 years ago by
Attachment: | 481_2.patch added |
---|
comment:10 Changed 17 years ago by
Keywords: | Review? added; Review- removed |
---|
Updated patch to use img.complete and increased the polling delay to 50ms for better performance.
comment:11 Changed 17 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:12 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [1576].
Click here for more info about our SVN system.
comment:13 Changed 16 years ago by
Cc: | adv.seb@… added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | FCKeditor 2.4.2 → FCKeditor 2.6.4 |
I reopen this bug, because I'm experiencing this problem with the following configuration:
Firefox: 3.0.10 FCKEditor: 2.6.4 Drupal: 6.12
I tried increasing the wait time to 1000ms without success. Sometimes the correct image size is used, sometimes it is 0x0.
comment:14 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Version: | FCKeditor 2.6.4 → FCKeditor 2.4.2 |
This ticket was closed 15 months ago.
Please open a new ticket with the proper reproduction steps for your issue
comment:16 Changed 14 years ago by
This bug seems to be fixed in the version I have. However the check for Firefox should be extended to include Safari as well. I saw the same problem there, and the following fixed it:
Index: src/webapp/editor/FCKeditor/editor/dialog/fck_image/fck_image.js =================================================================== --- src/webapp/editor/FCKeditor/editor/dialog/fck_image/fck_image.js (revision 2649) +++ src/webapp/editor/FCKeditor/editor/dialog/fck_image/fck_image.js (revision 2650) @@ -384,7 +384,7 @@
function ResetSizes() {
if ( ! oImageOriginal ) return ;
- if ( oEditor.FCKBrowserInfo.IsGecko && !oImageOriginal.complete )
oEditor.FCKBrowserInfo.IsSafari) && !oImageOriginal.complete ) |
{
setTimeout( ResetSizes, 50 ) ; return ;
Works fine for me in http://www.fckeditor.net/demo with Fx 2.0.0.3 , windows XP.
Please provide detailed steps to reproduce.