Closed Bug 273893 Opened 20 years ago Closed 20 years ago

Midas fails to apply color style to links, it applies the system default instead.

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bugzilla, Assigned: mozeditor)

Details

(Whiteboard: INVALID?)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

This bug was filed for the "Core" prodcut because it effects the Mozilla Suite
as well as Firefox.  The component "DOM: CSSOM" as chosen because this bug
involves scripting via MIDAS.

When using the Midas example, one can apply a default style to the text by
creating an empty HTML file with style information.  This effects the text in
the Midas IFrame.  

The reason for doing so is to style your rich text box to look similar to the
rest of your website, especially with matters of color.  If your website has a
black background with white text, then for things like blogs and message boards,
you would want the rich textbox to use this color scheme to if someone decides
to alter the color of their text they would see what the color looks like on a
black background instead of white.  Colored text that looks fine on a white
background may not look good on a black background.  The same for links.  

And that's the problem.  The anchor "A" tags don't accept a COLOR style.  

Of important note, other styles can be assigned to the "A" tag, such as
font-size, font-weight, border, margin, etc.  The "color" attribute is ignored.

The default internal browser colors are used instead, generally Blue and Magenta
for Unvisited and Visited links respectively.  

 

Reproducible: Always
Steps to Reproduce:
1.Download the Midas demo, http://www.mozilla.org/editor/midasdemo/
2.Create a file called "blank.html"
3.Blank.html should be a simple html file with a style section in the header
that defines styles, including COLOR but have the color different from your
default, for the "A" tag.
4.Edit the Midas demo page and find the Iframe tag with the "edit" ID.
5.Add the src property to the tag to load blank.html, src="blank.html"
6.Load the Midas example in your gecko browser.
7.Add some text, select the text, and then create a Link.

Actual Results:  
The link's color is the color specified in the browser as the default color for
links.  This is generally Blue and Magenta for unvisited and visited links as
long as you haven't changed your browser defaults.

Expected Results:  
The link's color should have been what was specified in the Style section of the
page.
This bug seems similar to bug 238516.  However, I think that bug is simply an
issue of CSS inheritance.  You can see a similar effect related to that bug in
the example that I've attached to this bug.  The text in the iframe is italic,
so applying font-style: italic; to any selected text is redundant.  Removing the
italic style simply removes the style instead of applying a style of font-style:
normal.  The effect is that the style defined in the Head is being applied,
which makes it look like you can't get rid of the italics.  This is just simple
CSS rules and works as it should, just maybe not as expected.

For this bug, the fundamental difference should obvious.  A  more specific COLOR
attribute is being applied, yet the browser is using a more general style
instead of the specific style.
Not a CSSOM issue.  Editor is applying EditorOverride.css to the document, which
has an a:link rule in it setting the color.  This rule has greater specificity
than the page's rule, if nothing else, so everything is working correctly.

Over to core editor, but I suspect this is invalid (since the behavior is quite
purposeful).
Assignee: general → mozeditor
Component: DOM: CSSOM → Editor
OS: Windows 2000 → All
QA Contact: ian → bugzilla
Hardware: PC → All
Whiteboard: INVALID?
I think this is invalid.  It's possible there is another bug on this issue.
The best that the editor can do right now is to set a style in it's override
stylesheet.  It would be nice to use the user's preferences or let someone
override it (or the user see what it is set to) but the mechanism underneath
(specific to link style / coloring) don't permit that.  (All of this is to the
best of my recollection.)
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: