CSS-set background image for anchor tag is not visible if it's the only tag in document

VERIFIED WORKSFORME

Status

()

P3
normal
VERIFIED WORKSFORME
18 years ago
17 years ago

People

(Reporter: sborusu, Assigned: attinasi)

Tracking

({css1, testcase})

Trunk
x86
Windows NT
css1, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPLICATE? (of 21415))

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
BuildID:    2000101014

I inserted a Named anchor(Target) in new composer window. After insertion it 
doesn't show the Anchor tag(Yellow anchor icon).

Reproducible: Always
Steps to Reproduce:
1. Open a new composer window and place the cursor somewhere.
2. Select Insert->Named Anchor...
3. It opens the Named Anchor properties dialog.
4. Enter Anchor Name.
5. Click on OK button.



Actual Results:  Its showing the blinking cursor in the composer window.

Expected Results:  It should show the yellow anchor tag.

Comment 1

18 years ago
visual cues for elements are displayed in Show All Tags mode, marking invalid
Status: UNCONFIRMED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → INVALID

Comment 2

18 years ago
verified in 11/8 build.
Status: RESOLVED → VERIFIED
(Reporter)

Comment 3

18 years ago
I can say Beppe's argument is valid except for Target (Named Anchor). We can 
see the Target tag in Normal Mode also. Then only you can change the name of 
the target (or something else) or you can change its position. Perform the 
above test sequence in composer of Netscape Communicator 4.73.

Do the following once again and see the effects.
1. Open a new composer window.
2. Click on Anchor button.
3. It opens the Named Anchor properties dialog.
4. Enter Anchor Name.
5. Click on OK button.
6. Nothing will be visible except a blinking cursor moved to next position.
7. Type a character.
8. We will see "Yellow Anchor Tag" inaddition to the character you typed.


Status: VERIFIED → UNCONFIRMED
Resolution: INVALID → ---
worksforme linux trunk build 2000111306.  When I follow the steps to reproduce a
visible yellow anchor is inserted in the standard composer mode.

Srinivasa, can you reproduce this bug in a recent build?  Oct 10 was a long time
ago... :)

Comment 5

18 years ago
now that is a bug! and it should be consistent -- thanks for pointing that out,
reassigning to cmanske
Assignee: beppe → cmanske
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla0.9

Comment 6

18 years ago
I think this is a dup, actually. The cause is that CSS isn't displaying the image
when there's no content after the anchor at the end of a page.
Summary: Anchor Tag doesn't visible after insertion → Anchor Tag doesn't visible after insertion at end of document

Comment 7

18 years ago
It looks like this only happens if there's *no content at all* in the page other
than the named anchor, thus the frequency of this problem is quite low. If
there's anything before or after the named anchor, the icon displays.
Note that this icon is a background image set via this CSS rule:
a[name] {
  min-height: 17px; margin-left: 2px; margin-top: 2px;
  padding-left: 20px;
  background-image: url(chrome://editor/content/images/tag-anchor.gif);
  background-repeat: no-repeat;
  background-position: top left;
}
Reassigning to layout/CSS guru.
Assignee: cmanske → attinasi
Summary: Anchor Tag doesn't visible after insertion at end of document → CSS-set background image for anchor tag is not visible if it's the only tag in document
Target Milestone: mozilla0.9 → ---
(Assignee)

Comment 8

18 years ago
Created attachment 19770 [details]
Testcase showing the problem in browser
(Assignee)

Comment 9

18 years ago
I think the frame is not even being created for the A - looking deeper now...
Status: NEW → ASSIGNED
(Assignee)

Comment 10

18 years ago
OK, the frame is being created, but it takes up no space.

A simpler testcase is this:

<body>
<a name="foo" style="border:1px red solid"></a>
</body>

There is nothing displayed. If you put a single character after the </a> then
you see the border for the A.

Over to buster for a closer look - this may actually be correct behavior (should
a named-anchor take up any space if it does not actually name anything?), but it
is problematic for the editor, not to mention quirky. Also, using something like

a[name]:after {
content: "|";
color: transparent;
}

won't work because the color is not made transparent (that was my attempt at a
workaround).
Assignee: attinasi → buster
Status: ASSIGNED → NEW
Empty inlines should NOT dissapear, whatever happens, certainly not in standard
mode. (I believe in quirks mode there is a hack for ignoring empty inlines, but
that doesn't apply here.)
Keywords: correctness, css1, mozilla1.0, testcase
Whiteboard: DUPLICATE? (of 21415)
Isn't this a duplicate of bug 21415?
Build reassigning Buster's bugs to Marc.
Assignee: buster → attinasi
Testcase displays anchor in todays cvs trunk build on WINNT. Marking WFM.
Status: NEW → RESOLVED
Last Resolved: 18 years ago17 years ago
Resolution: --- → WORKSFORME

Comment 15

17 years ago
marking VERIFIED. REOPEN if still not fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.