CSS Defined on html Element (or Toplevel Element in XML) Causes Autoscroll Icon to Exhibit Undesirable Effects

RESOLVED FIXED

Status

()

defect
--
minor
RESOLVED FIXED
15 years ago
11 years ago

People

(Reporter: robert, Unassigned)

Tracking

(Blocks 1 bug, {polish})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: Probably depends on Bug 242621 to be fixed, URL)

Attachments

(3 attachments)

(Reporter)

Description

15 years ago
On http://webperso.easyconnect.fr/danielglazman/weblog/index.php/ the autoscroll
icon displays to the upper-left of the cursor when autoscroll is invoked.

Note this is not a dupe of Bug 238815.  It still exists after the fix for that
bug was checked in.
(Reporter)

Updated

15 years ago
Status: NEW → ASSIGNED
Summary: CSS Causes Autoscroll Icon to Display to the Upper-left of Mouse Cursor → CSS Causes Autoscroll Icon to Display to the Upper-left of Mouse Cursor
Target Milestone: --- → Firefox0.9
QA Contact: mconnor
(Reporter)

Comment 1

15 years ago
Posted file Minimal Testcase
(Reporter)

Comment 2

15 years ago
The problem with this is that the margin style is applied to the html object,
and no styles that are applied to the autoscroll icon will override it.  That
is why adding el.style.margin = "0" has no effect.

However, with that said, we should still go ahead and checkin this patch,
because it will solve any problems with CSS that applies a non-zero margin to
the IMG attribute.
(Reporter)

Comment 3

15 years ago
Comment on attachment 147572 [details] [diff] [review]
Partial Patch (Fixes CSS applied to objects other than HTML)

Mike, we should probably go ahead and check this in, because even though it
doesn't solve the problem in the bug, it will help pages that apply a margin to
the BODY or IMG elements.
Attachment #147572 - Flags: review?(mconners)
(Reporter)

Updated

15 years ago
Attachment #147572 - Flags: review?(mconners) → review?(mconnor)
(Reporter)

Updated

15 years ago
Blocks: 212273
(Reporter)

Comment 4

15 years ago
We really need to get the autoscroll image to be an overlay or something instead
of an element in the DOM.  It causes too many problems.
(Reporter)

Updated

15 years ago
Summary: CSS Causes Autoscroll Icon to Display to the Upper-left of Mouse Cursor → CSS Defined on html Element Causes Autoscroll Icon to Exhibit Undesirable Effects
Attachment #147572 - Flags: review?(mconnor) → review+
partial patch checked in 2004-05-06 18:02 on branch and trunk
(Reporter)

Comment 6

15 years ago
This may require Bug 242621 to be fixed, because as long as the autoscroll icon
is in the DOM, there doesn't seem to be a way to not pick up the CSS attributes
from the html element (which matters in the case of margins & padding).
Status: ASSIGNED → NEW
Depends on: 242621
Whiteboard: Probably depends on Bug 242621 to be fixed
Target Milestone: Firefox0.9 → ---

Comment 7

15 years ago
Also occurs on http://aebrahim.blogspot.com/atom.xml , but not 100% sure if the
cause is the same.

Using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040515
Firefox/0.8.0+
(Reporter)

Comment 8

15 years ago
(In reply to comment #7)
> Also occurs on http://aebrahim.blogspot.com/atom.xml , but not 100% sure if the
> cause is the same.
> 
> Using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040515
> Firefox/0.8.0+

From a quick glance, it doesn't appear to be related.  I'll try to trace its
cause later on, although I may end up spinning it off into a separate bug.
(Reporter)

Comment 9

15 years ago
Tweaking summary to include variant in comment #7.  It is the same issue, except
in an XML file instead of a HTML file.
Summary: CSS Defined on html Element Causes Autoscroll Icon to Exhibit Undesirable Effects → CSS Defined on html Element (or Toplevel Element in XML) Causes Autoscroll Icon to Exhibit Undesirable Effects

Comment 10

15 years ago
I noticed this yesterday while looking through the Sun.com blog roller.  Seems a
few of the bloggers have a nice default template that causes some weirdness for
the autoscroll icon.

For example, on http://blogs.sun.com/roller/page/moazam middle-clicking in
Firefox to bring up the Autoscroll shows the autoscroll icon, but it has a
square border around it.

Checking the css at http://blogs.sun.com/roller/themes/sotto/styles/default.css
reveals this:
img {
  border: 1px solid #BAB5AB;
}

Sure enough, the autoscroll icon grabs a border from that CSS.  Change the
border to 10px solid #FF0000 and you get a huge red border around the autoscroll
icon.  Ick!
(Reporter)

Comment 11

15 years ago
Comment #10, that was fixed a long time ago with the checkin for Bug 215825.  It
will be in Firefox 0.9.

Comment 12

15 years ago
*** Bug 242551 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 13

15 years ago
*** Bug 253674 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 14

15 years ago
*** Bug 262928 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 15

15 years ago
Yet another example of this problem:
http://ln.hixie.ch/

Offending CSS:
/* Joke on the Firefox users */
html > img { width: 400px ! important; height: 400px ! important; background:
url(/resources/images/astrophy/48) no-repeat ! important; cursor: pointer !
important; }
*** Bug 279147 has been marked as a duplicate of this bug. ***
So long as the IMG is in the DOM, the page will be able to screw with it. For
example, by removing it.

Comment 18

14 years ago
*** Bug 282710 has been marked as a duplicate of this bug. ***

Comment 19

14 years ago
*** Bug 297664 has been marked as a duplicate of this bug. ***
Posted patch patchSplinter Review
Well, since these style properties are set, they might just as easily be made
important, I guess, so those properties can't be changed with external css.
I also added display inline, it's not really necessary, but currently the
options help (prefs.xhtml) doesn't show an autoscroll image, because of an img
{display:none} rule.
Attachment #187248 - Flags: review?(mconnor)
(Reporter)

Updated

13 years ago
Assignee: rparenton → nobody
QA Contact: mconnor → general
Attachment #187248 - Flags: review?(mconnor)
This should be fixed with my checkin for bug 242621.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.