Closed Bug 96832 Opened 23 years ago Closed 23 years ago

[EVENTTARG]Elements with negative z-index steal events (links not clickable)

Categories

(Core :: Web Painting, defect)

defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: markushuebner, Assigned: roc)

References

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

When trying to click on a link on the left side (the red ones) clicking on them doesn't do anything at all. The code is usual HTML: <a href="living.asp" class="gnorm2">Wohnen im Central</a> Using build 2001082303
adding keywords
Windows 2000 Build: 20010824 I am having no trouble loading the pages. I doubt the latest build will mak a difference (only one day apart from the one I tested on).. but you can try. Is it possible that you were not "online"clicked to go "offline" by accident? (I would doubt you did this, because you could still post the bug) Are there any other pages or websites that do not seem to load besides the ones listed with the url you provide?
WFM, build 2001-08-23-08 on Linux (SuSE 7.1)
wfw2 build 20010824 always try to reproduce bugs with a fresh profile first. So before filling the bug, create a new profile and see if you can reproduce..
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Henrik, why should I try with a new profile when using an existing profile is the situation that will be used out there?! when reporting bugs we should use the most common settings.
Still see this with build 2001082508
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
btw: also created a new profile and the problem is still there.
Could you tell us more details of what is happening? Examples include: (1) Does hovering over a link change the pointer to a "hand" cursor (or whatever you have set as default) (2)Do the links "underline" when you hover over them? (3) When you click on them, what browser activity is there? Does Mozilla even attempt to load the pages, or show any indication that you've clicked? (4) Are the links the only thing you notice failing? Does the rest of Mozilla and the website seem to work as you expect? Also, What might be helpful is a testcase. A testcase would be very helpful in narrowing down the problem for those of us who do not seem to have the same difficulties. Did you try a 'fresh' install of mozilla? is it possible that there were corrupted data files somewhere? You'd have to delete (or rename) the "Mozilla" folder in your Application Data folder, and also run Mozilla from a newly downloaded binary. (I have the same computer configuration as you report the problem on, and I don't see anything in the Windows 2000 architecture that would cause this problem when I look at the page source.) Another thing to try.. remove all of your plugins, and see if any of those have caused a problem. (Actually, you may want to try this first.)
Thanks Ryan for your feedback. (1) Rovering over a link doesn't change the pointer. (2) The links also don't underline when hovering over them. (3) When clicking on them nothing happens at all. No activity from Mozilla. (4) There is also another strange thing. The headline "Sie kennen das:" as well as the first words "... den ganzen Tag" cannot be marked. The rest works fine. I'm trying to provide a more simple testcase. As usually I am trying a fresh installation of mozilla, deleting all previous files and directories (I am using the latest ZIP file). I haven't installed any additional plugins.
Reassigning to pierre.
Assignee: karnaze → pierre
Status: REOPENED → NEW
build 2001083003 still has the problem.
A smaller testcase is available at http://www.world-direct.com/central/moztest.htm
I tried on Mac and Win98 and like 3 other persons already reported, it works for me too. Markus: can you reproduce the bug on other machines? If yes, please try to simplify the testcase even more.
I see this problem when using my home banking account. I'll upload a simplified testcase
seeing this too with build 2001090503
Keywords: testcase
wfm with 090408/NT4
WinMe and Linux also show the strange behavior w/ the testcase
OS: Windows 2000 → All
Link worksforme build 2001083103 Testcase: seeing behavious as described in HTML Comment
seems things are quite strange here 8-) hope we can get closer to it and know what is the cause for this behaviour.
Keywords: qawanted
The "Simplified Testcase" from Daniel Mario Vega is invalid, it is a dup of bug 95176. Markus: so far you are the only one to see the problem with the page at the URL above or at http://www.world-direct.com/central/moztest.htm (Daniel, WD and Christian refered to the "Simplified Testcase"). Could you simplify "moztest.html" as much as possible and attach it to the bug report? Please make sure that the bug can be reproduced with the testcase after you attach it, and try on different platforms. Thanks.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.5
I discovered what causes this behaviour! Its just one single line: <div id="babe" style="position: absolute; top: 0px; left: 324px; width: 266px; height: 290px; z-index: -1;"><img src="imgs/babe.gif"></div> A more (not working) testcase is at http://www.world-direct.com/central/moztest2.htm And a working testcase with the "bad line" removed is at http://www.world-direct.com/central/moztest3.htm Using build 2001090703
just discovered that when the window is not full-size it's working. if full-size not working as mentioned
Summary: Links not clickable → Links not clickable when mozilla window full-sized
I think the problem in attachment 48421 [details] is a similar problem to this bug as when I comment out: <div style="position:absolute;left:395px; top:12px"> <table> <tr> <td>&nbsp;</td> </tr> </table> </div> the problem goes away. It is not a dup of bug 95176. This bug seems like yet another inheritance problem caused by absolute positioning? (indirectly maybe?)
Summary: Links not clickable when mozilla window full-sized → Links not clickable
I think the problem is the positioning of the div element. Although in the file moztest2.htm it has a z-index of -1 and isn't displayed at all it is exactly positioned over the links, hence the links are not clickable. Another testcase at http://www.world-direct.com/central/moztest4.htm shows the problem clearly. When the window size is that width that the image is over the links they are not clickable anymore. That's what is happening in the moztest2.htm
Severity: major → critical
just to explain why not everyone is seeing this problem in the first run: When having a screen resolution of 1280x1024 the picture is positioned excatly over the links and the bugs occurs. The layout is designed that the picture is always positioned exactly where the links are ... it's using absolute values in this example - these should normaly be used dynamically so that on changing the window with the picture is positioned correctly. So just use http://www.world-direct.com/central/moztest4.htm and expand your window with so that the picture is positioned over the links. Then you can go to http://www.world-direct.com/central/moztest2.htm and the links won't work. Maybe we should change the bug summary?
Markus, I can reproduce the problem as you describe in your last comment. Increasing the width of Mozilla to 1280 the links are not functional. Build ID: 2001090609 - OS: Linux
updating keywords
Keywords: qawanteddom0
Daniel: your home banking testcase is an evang problem (meaning its just a case of bad website coding) I'll attach a modified version of your testcase that demonstrates this bug
Keywords: dom0qawanted
Attached file a better testcase
Keywords: nsbranch
Hardware: PC → All
any chance of a low risk fix for this in the next few days?
Summary: Links not clickable → Links not clickable when something is behind it
I think the problem here is that nsView::HandleEvent checks all children before checking the parent, which doesn't correspond to the way we paint.
Component: Layout → Event Handling
Summary: Links not clickable when something is behind it → [EVENTTARG]Elements with negative z-index steal events (links not clickable)
roc: Are there cases with the new view manager where we paint one view "in the middle" of another? If so, that would make fixing this hard.
The problem is very simple: currently, view manager event handling completely ignores z-index. To fix this the view manager should use nsViewManager::CreateDisplayList to figure out the order to process views. This is equivalent to one of the bugs on my list, buf 49175.
Reassigned to Views. Kevin, to reproduce: - load attachment 49014 [details] - click "Set z-index of div to -1" - move the cursor at the location of the red div (ie. above the "ABOU" of "ABOUT MOZILLA") ===> Bug: you can't click on that part of the link. Also check with roc for bug 49175.
Assignee: pierre → kmcclusk
Status: ASSIGNED → NEW
Component: Event Handling → Views
Keywords: qawanted
There aren't any comments on this bug since the 18th of Sept. Can QA regess against the Netscape commercial builds and determine if this is still a valid bug? Please mark as nsbranch+ which will get this on the PDT radar if you think this is critical and can give us an ETA for the fix. Else, mark is as nsbranch-. Also, can someone comment in the bug how serious you think this is? PDT is only accepting "stop ship" bugs at this point such as data loss, loss of major functionality, regressions and bugs to the eMojo "stop ship" features.
Being not able to click on links is a loss of major functionality. Should try to get this in to avoid further inconveniences - especially for the commercial build!
I see this problem in my home banking account Bank of Boston: http://www.bostonaccess.com.ar/ I can use the service with no problems, but I can not click the "exit" link to logoff. I have found that I can navigate links using the "TAB" key and then hit "Enter".
Marking nsbranch-
Keywords: nsbranchnsbranch-
Moving to Mozilla0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Blocks: 107067
Keywords: nsbranch-
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Keywords: mozilla0.9.6
regarding the latest comment shouldn't the target milestone be 0.9.6 ?! Think this is really important to have included in the next release.
Target Milestone: mozilla0.9.7 → mozilla0.9.9
Keywords: mozilla0.9.7
Keywords: mozilla1.0
Keywords: nsbeta1
Target Milestone: mozilla0.9.9 → mozilla1.1
I have the fix.
Assignee: kmcclusk → roc+moz
Keywords: mozilla0.9.4
This patch reorganizes view system event handling. Event handling is moved from nsView into nsViewManager (except that we leave a hook in for native scrollbars in nsScrollingView, grr!). The view manager handles an event by creating a display list for a 1x1 rectangle at the event target point, and then dispatching the event to the elements of the display list. Using the same display list code as the paint path ensures event handling matches what is being rendered, including correct handling of z-index. It also gets rid of the O(n^2) problems that nsView used to have in a nice clean way, and doesn't crash when views are deleted. Best of all, sharing the display list code path ensures that event handling and painting will stay in sync during future changes. The main possible downside (apart from the potential regressions anytime anyone touches this core code) is performance. The display list path is definitely higher overhead than the old code, and it dynamically allocates some objects. I haven't worried about this so far, since I suspect events don't arrive frequently enough for this code to get onto the performance radar. If possible I'd like to get this checked in ASAP since we're still early in the milestone.
*** Bug 49175 has been marked as a duplicate of this bug. ***
Attached patch Revised patchSplinter Review
This patch is the previous patch with only one change: at the beginning of nsViewManager::BuildEventTargetList I added a check to see if we're currently painting. No-one should be dispatching events during paint, but other people's bugs could cause it to happen; if it does, we'll just drop the event. This prevents the event handling code from trying to reuse mDisplayList, which could cause a crash when we return to the painting code. Note that this code works just fine with painting while an event is being handled, or even with nested event handling, because it copies the display list to a local buffer and relinquishes mDisplayList before it actually processes the event.
Attachment #66856 - Attachment is obsolete: true
Comment on attachment 67823 [details] [diff] [review] Revised patch I ran with the patch installed for a few days, and I didn't notice any regressions or performance issues. I also inspected the patch and stepped through the code in the debugger on WIN32. The code looks straightforward and solid. r=kmcclusk@netscape.com
Attachment #67823 - Flags: review+
CC'ing saari and joki.
No longer blocks: 107067
What's the status on this? Are joki and saari looking at it?
Status: NEW → ASSIGNED
Target Milestone: mozilla1.1 → mozilla0.9.9
I just thought they might be interested in knowing about this change. They are not reviewing the change AFAIK.
It seems both attinasi and waterson are on vacation or something, so CC'ing brendan for super-review.
Comment on attachment 67823 [details] [diff] [review] Revised patch sr=brendan@mozilla.org, the code looks good and I trust you. /be
Attachment #67823 - Flags: superreview+
Thanks. You probably shouldn't trust me, I'm averaging one regression per fix checked in. Although I'm also averaging under 24 hours for fixing the regression :-).
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Marking verified in the OS X trunk (2002-04-12-03) and Windows ME Builds (2002-04-12-06).
Status: RESOLVED → VERIFIED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: