firefox caption width not set

steinmb - May 30, 2008 - 02:40
Project:Image Caption
Version:6.x-2.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have tested this on my local MAMP config and it is working great, thanx for a very useful module. I didn't notice it right away since it looked like the module was working just fine. Then noticed that the caption text was not getting wrapped. Then I checked the div with Firebug I found it was missing with info.

<div style="" class="image-caption-container">

You can verify it on my test article http://bioprotect-orgnz.axiion.com/207/testpage.

Enabled the module, configured image capture and added the class in TinyMCE, that's all. It is running on jQuery update like you prob. can see from the details but I have tested this locally and it is working just fine on my MAMP installation.

Setup:
Drupal 5.7
JQuery is 1.1.2
PHP 5.2.3-0.dotdeb.0
MySQL database 4.1.11
Apache/2.0.54

Cheers
Stein Magne

#1

steinmb - May 30, 2008 - 03:07

Arrrgh!
After 4 hours it just started working! Suspecting my clients hosting company having some strange setting that could trigger some special js error. I was able to catch a glimpse of some errors from imce but they are also gone.

var imgwidth = $(this).width();

should return the width of the image. I'll leave this issue open and will be testing more through the weekend, strange but I think it is out of our hands.

Interested in info. about how to make this work with image attach? You could have added the info. to your README.

--
Stein Magne

#2

davidwhthomas - June 1, 2008 - 00:44
Status:active» fixed

This should be set in image_caption.js by:

$(this).parent().width(imgwidth);

In any case, it sounds like it's working now for you.

#3

Anonymous (not verified) - June 15, 2008 - 00:51
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#4

peggys mouse - December 9, 2008 - 20:12
Title:image-caption-container does not get width set by image capture» firefox caption width not set
Version:5.x-1.1» 5.x-2.1
Component:Code» Miscellaneous
Category:bug report» support request
Status:closed» active

i know this has been an ongoing problem. i'd like to help get it figured out.

i got the module to set the caption via TinyMCE but the caption doesn't wrap in FF properly. it works in IE. the FF container ends up being the width of the non-wrapping text. here is the source from FF:

<div class="image-caption-container" style="float: left;"><img style="" src="/sites/default/files/Joy_Becker_-_Nanaimo_Daily_News_Nov_2008.jpg" alt="some text" title="some other text" class="caption" width="170" align="" height="170"><div class="image-caption">more text</div></div>

should the img tag have a style? i can manually set the width of the caption via .image-caption in the style.css but that's obviously not the solution. 170 px is the correct width of the image.

interestingly, the source for IE shows no image-caption-container class:

<img src="/sites/default/files/Joy_Becker_-_Nanaimo_Daily_News_Nov_2008.jpg" alt="some text" title="some other text" class="caption" width="170" align="left" height="170" />

the image_caption.js is being included. the page in question is here: http://www.optionsforsexualhealth.org/media-centre/media-coverage/school...

any help would be appreciated.

#5

steinmb - April 26, 2009 - 21:56
Status:active» closed

Closed due to inactivity

#6

digi24 - October 27, 2009 - 18:28
Version:5.x-2.1» 6.x-2.x-dev
Status:closed» active

I would like to reopen this issue.

As far as I am concerned, it occurs, whenever the image is loaded at a later time. Reloading the page solves the problem.

In order to reproduce:
1. Create a node, with an image that is displayed via image cache.
2. On the first load of the newly created node, "imgwidth" will be empty.

 
 

Drupal is a registered trademark of Dries Buytaert.