Re: Amaya 9.52 WinXP bug: can not create a link containing only an image

Bartolomé Sintes Marco wrote:

> In Amaya 9.52 for Windows XP, it is not possible to create a link that 
> contains only an image.
> 
> Steps to reproduce:
> 1. Insert an image in a paragraph
> 2. Select the image (clicking in it)
> 3. Choose the "Links > Create or change link" menu
> 4. A warning message is shown: "An anchor cannot contain these elements"
> 
> I would say that the link can be created if the selection contains some 
> text after the image, but it can not be created contains an image at the 
> end of the selection.

Short version:  With the 9.52 binary on Windows 2000 and with
yesterday's CVS code on Debian, I am unable to make any link
encompassing the image in:

  http://www.firstpr.com.au/temp/amaya/amaya-test-30.html

irrespective of whether there is text to the left or right of what I select.

 - Robin



Long version if anyone is interested:

Please see my previous message (Re: Bug report: /> and then </a> tag on
new line) for my observations of how Amaya insists on placing a newline
after an image, and how this results in a space which Amaya does not
display initially, but will display after a file reload.

If I open the above file, place the cursor to the left of "xxxx" I find
3 ways of selecting just the image (as tested by "delete"):

1 - Right arrow x 4.

2 - Right arrow x 5.

3 - Right arrow x 4 then hold down shift and press right arrow.

4 - Right arrow x 5 then hold down shift and press right arrow.

3 and 4 result in selection marks around the image.


In cases 3 and 4 an attempt to create a link fails, with:

  "An anchor cannot contain these elements"

In cases 1 and 2, a dialogue box appears: "Attribute - Insert the URI or
browse".  If I cancel this, the display shows a space to the left of the
image.  Repeating this results in more spaces being added.  In View
Source, the spaces are actually added immediately before the "yyyy" in
what was originally:

<body>
<p>xxxx<img alt="Photos of Queensland Daintree rainforest and beach"
src="show-and-tell-green-ants-310x300.jpg" />
yyyy</p>
</body>

If I reload the file, move the cursor to position 5, I can insert a
link.  I type in "blah.html" and the resulting source is:

<body>
<p>xxxx<a href="blah.html"></a><img
alt="Photos of Queensland Daintree rainforest and beach"
src="show-and-tell-green-ants-310x300.jpg" />
 yyyy</p>
</body>

The space before "yyyy" is wrong, but may have no practical impact.  The
link is useless, since it doesn't encompass anything - but then I didn't
expect it to since I didn't select anything for the link to span.

I reloading the file and moved the cursor 3 to the right.  Then I held
shift while pressing the right arrow x 2.  The rightmost 'x' and the
image are selected.  I get the same error message if I try to make a link.

Repeating the procedure with 3 right arrows the selection looks the same
and I get the same error message.

Repeating the procedure with 4 or 5 right arrows, the selection includes
the space after the image.  Still the same error occurs.

Repeating the procedure with 6 right arrows, the selection includes the
space after the image and the left-most 'y'.  Still the same error
occurs.  Likewise more than 6, with more 'y's selected.  So it seems I
can't make a link including this image.

(It doesn't help to edit the source to remove the newline after the image.)

I am able to place a link on any single or multiple 'x' or 'y'
characters, but there is always a space added to the left of the "yyyy"
(unless I used source edit to remove the newline there), which probably
doesn't matter, since there is already an erroneous newline after the
image, before the "yyyy".

With the Windows binary the behavior is the same - I am unable to place
a link on anything including the image.

Received on Thursday, 26 October 2006 03:36:08 UTC