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)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tu, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

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&ouml;henangaben" coords="0,5,245,20" alt="" href="#map" onMouseOver="output('Positions- und H&ouml;henangaben, wie: km 1,5 | 250 m&uuml;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.
Assignee: nobody → events
Blocks: 302536
Component: General → Event Handling
Keywords: regression
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Attached file Testcase #1
Case 1 corresponds to the Reporter's example in comment 0.
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: regressiontestcase
Resolution: --- → INVALID
No longer blocks: 302536
(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.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: