suresh-kumara / whizzywig

Automatically exported from code.google.com/p/whizzywig
MIT License
0 stars 0 forks source link

image alternate text inserted after image when editing an image #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Go to whizzywhig basic demo
2. insert an image with alternate text
3. double click on the image to edit it and insert again

What is the expected output? What do you see instead?
I expect the image html to be changed to whatever the new values are.  If 
nothing is changed then the html should stay the same.

Instead the alternate text is copied right after the image html.  Every time 
you do this the alternate text is inserted after the html again so it builds up 
each time.  If there is no alternate text then the basename of the image file 
is inserted.

What version of the product are you using? On what operating system?
version 61 on Mac OSX with Seamonkey, Firefox and Safari browsers.  Not sure of 
the version used in the basic demo but it misbehaves the same way as version 61.

Please provide any additional information below.

Original issue reported on code.google.com by Thomas.Y...@gmail.com on 6 Jun 2011 at 1:59

GoogleCodeExporter commented 8 years ago
This is probably a simple bug to fix -- a small change to the code.  If you 
could provide a patch to version 61 my users and I would greatly appreciate it. 
 Thanks.

Original comment by Thomas.Y...@gmail.com on 15 Jun 2011 at 1:28

GoogleCodeExporter commented 8 years ago
Thanks for report. Will investigate.
~Jorogo

Original comment by unve...@gmail.com on 23 Jun 2011 at 10:09

GoogleCodeExporter commented 8 years ago
Thanks.  I normally use a Mac but was able to look at it on a PC running 
Vista and IE8 at our library.  It is different on IE8 but still not 
right -- it sometimes inserts a new image instead of just editing the 
old image.  Sorry to not be more specific.

- Tom

Original comment by Thomas.Y...@gmail.com on 23 Jun 2011 at 11:50

GoogleCodeExporter commented 8 years ago
Fixed this one by doing the following on insertImage function:

after code:

img+='/>';

replace 

insHTML(img); 

with:

if(papa.nodeName=="IMG"){//Edit current image
 papa.src=URL;
 papa.alt=alt;
 papa.style.border=border;
 papa.style.margin=margin;
 papa.style.cssFloat=side; //Compliant browsers
 papa.style.styleFloat=side; //IE
}
else{//Insert new image
 insHTML(img);
}

Original comment by jgm...@gmail.com on 2 Aug 2011 at 1:07

GoogleCodeExporter commented 8 years ago

Original comment by jgm...@gmail.com on 2 Aug 2011 at 2:56

GoogleCodeExporter commented 8 years ago
Fixed on svn

Original comment by jgm...@gmail.com on 2 Aug 2011 at 8:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by Thomas.Y...@gmail.com on 29 Aug 2011 at 8:36