Closed
Bug 380075
Opened 18 years ago
Closed 18 years ago
set cursor style not possible to set with javascript
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: tu, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file)
2.00 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
I'm using image-maps with different cursor-styles, which are set by javascript with an onmouseover event. This works on IE-Eplorer 6 and up to Firefox 1.5. 0.11.
With Firefox 2.x it stops to work. Are there any setting inside Firefox-settings, which prevent this to work? I debug the webpage with firebug an can see that the code changes exactly as wanted, but the cursor do not change.
snipet of webpage:
<div>
<img src="pics/helpmap.png" id="plan" usemap="#map" alt="Streckenplan" style="cursor: auto;">
<map name="map">
<area shape="rect" Title="Positions- und Höhenangaben" coords="0,5,245,20" alt="" href="#map" onMouseOver="output('Positions- und Höhenangaben, wie: km 1,5 | 250 müM','','','crosshair')" onMouseOut="output('')">
part of javascript:
function output(text, color, type, cursor)
{
var length;
color = typeof(color) == "undefined" ? "#000000" : color;
type = typeof(type) == "undefined" ? "normal" : type;
cursor = typeof(cursor) == "undefined" ? "auto" : cursor;
if (text.length > 5){ length = text.length +1;}
else { length = 40;}
document.getElementById('plan').style.cursor = cursor;
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1•18 years ago
|
||
Regression range for this is http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2006-04-20+12%3A00&maxdate=2006-04-20+16%3A00
Could be caused by Bug 302536.
Assignee: nobody → events
Blocks: 302536
Component: General → Event Handling
Keywords: regression
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Comment 3•18 years ago
|
||
I'm pretty sure this works as intended. Gecko takes the cursor from
the AREA element and your example is setting the cursor on IMG.
If the AREA has a href attribute it's a link and we style it as such.
You can either set the cursor on the AREA element instead, or you could add
the following CSS rule and continue to set the cursor on the IMG element.
area:-moz-any-link { cursor:inherit; }
(case 3 in the testcase demonstrates this)
-> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Keywords: regression → testcase
Resolution: --- → INVALID
Reporter | ||
Comment 4•18 years ago
|
||
(In reply to comment #3)
> I'm pretty sure this works as intended. Gecko takes the cursor from
> the AREA element and your example is setting the cursor on IMG.
> If the AREA has a href attribute it's a link and we style it as such.
> You can either set the cursor on the AREA element instead, or you could add
> the following CSS rule and continue to set the cursor on the IMG element.
>
> area:-moz-any-link { cursor:inherit; }
>
> (case 3 in the testcase demonstrates this)
>
> -> INVALID
>
You are right, I didn't realize that the area-element has its own properties. With firebug I can see how the properties of img-element changes and not the
properties of area-element. Thanks for your clear example. Gecko seems to be
the first browsing engine which handles this situation in the right way.
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•