Closed
Bug 141073
Opened 24 years ago
Closed 21 years ago
javascript function doesn't work in element beside an image if the page is scrolled down
Categories
(Core :: DOM: Events, defect, P4)
Tracking
()
RESOLVED
WORKSFORME
Future
People
(Reporter: arcolf, Assigned: saari)
References
()
Details
(Whiteboard: [DUPEME])
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0rc1) Gecko/20020417
BuildID: 2002041711
I have a page with a large image and two links on the left and right side of the
image. The links call a Javascript function, which opens an alert popup. When
you click on the link, the popup doesn't pop up. The window only moves a bit up
to the begin of the image. If you insert a <br> between the <a> and the <img>
the function works and the popup appears.
Reproducible: Always
Steps to Reproduce:
1. Open the url http://stud3.tuwien.ac.at/~e9725141/test.html
2. Click on the test links beside the image => no popup
3. Click on the test links above or below the image => alert popup appears
Expected Results: The popup should always appear, no matter if the link is
beside, above or below the image
Comment 1•24 years ago
|
||
seeing the same with Linux build 20020428
I think what you're seeing is related to the fact that Mozilla seems to scroll
such that the line that contains the link you clicked is on the screen.
Unfortunately, it seems that this scrolling also breaks the JavaScript.
To see this, notice that the left/right test links work if you're already at the
top of the page. Also the top/bottom tests don't work if the text is not fully
on the screen.
OS: Windows 98 → All
Comment 2•24 years ago
|
||
To events. This is a known problem -- the onfocus is fired first, then we
scroll, then we fire onclick to whatever is now under the pointer, which may no
longer be the link....
Assignee: rogerl → joki
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Events
Ever confirmed: true
QA Contact: pschwartau → vladimire
Comment 3•24 years ago
|
||
*** Bug 156525 has been marked as a duplicate of this bug. ***
Comment 4•23 years ago
|
||
This works for me on recent builds on Mac and Windows. Resolving works for me.
PS. I love the picture, if you are the one verifying this, you wont be sorry ;)
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Bug 156525 still fails with Mozilla 1.3 alpha under Windows. Does the test case
work with recent builds?
Comment 6•23 years ago
|
||
Is this bug working for you? I also see that that bug is failing. Perhaps its
not a dupe after all.
Comment 7•23 years ago
|
||
on both bugs, if you make the window small enough I see both bugs.
to reproduce this bug, make the window small enough that you get a scrollbar and
make sure that top of the first image is not in the window. left-click on the
link next to the first image. the window scrolls, but that's it.
Vladimir and ostgote: are you sure this bug is WFM?
Comment 8•23 years ago
|
||
Ah, sorry. This doesnt work for me. I didnt see anything about scrolling down in
the steps...
Status: RESOLVED → REOPENED
Component: DOM Events → Layout
Resolution: WORKSFORME → ---
Summary: javascript function doesn't work in element beside an image → javascript function doesn't work in element beside an image if the page is scrolled down
Comment 9•23 years ago
|
||
Doesnt sound like dom events, the issue is that the page scrolls up when the
link is pressed, and when mouse is release it is no longer on the link, so the
link never gets the click event. layout perhaps?
Assignee: joki → other
Status: REOPENED → NEW
QA Contact: vladimire → ian
Updated•23 years ago
|
Priority: -- → P4
Target Milestone: --- → Future
Comment 10•23 years ago
|
||
I don't see this. Here is what I do:
1. Make sure the window is small enough that a vertical scrollbar appears on the
right.
2. Click on the link to the right of the first picture.
3. A popup shows up.
It is my understanding that if this bug existed, #3 would not happen.
Maybe this was fixed in recent builds? I have WinXP 2003012908.
Comment 11•23 years ago
|
||
This bug is not fixed. I've just tested in with 1.3b final on Win NT 4.0 again.
John: Are you sure the vertical scrollbar was not on top (see summary)? If the
scrollbar is on top your step 2 works but if the scrollbar is somewhere below it
doesn't work. The effect is only an upward scrolling, no alert.
Comment 12•23 years ago
|
||
1. Make sure the window is small enough that a vertical scrollbar appears on the
right.
** 1.5. scroll the first image at least partially off the top of the page.
2. Click on the link to the right of the first picture.
3. A popup shows up.
Comment 13•23 years ago
|
||
Ah, thanks, now I see it too.
Comment 14•23 years ago
|
||
Back to events, where it belongs. bz's assessment of the situation is correct,
and you can see it if you hold the mouse down longer before you finish clicking.
Hold the mouse down, the element is focused and the page moves to fit the
entire block; then when you mouse up, the mouse is no longer on the <a href> and
therefore the click does not happen (a click only happens if you mousedown and
mouseup on the same element).
The bug here could probably be fixed by fixing the code that scrolls to fit the
element; perhaps that code should only scroll to the top of the <a href>, not
the entire block including the img. Then again, perhaps that would break
something ;)
Assignee: other → saari
Component: Layout → DOM Events
QA Contact: ian → desale
Whiteboard: [DUPEME]
Comment 15•22 years ago
|
||
Hmm ... this bug and bug 156525 now works for me.
Moz 1.7a build 2004021508 WinNT4.
Comment 16•21 years ago
|
||
(In reply to comment #15)
> Hmm ... this bug and bug 156525 now works for me.
WFM with Mozilla 1.7.3, Mozilla 1.8a4, and 1.8a5 build 2004101405 on WinNT4.
Could be closed?
Comment 17•21 years ago
|
||
worksforme as well with linux trunk 2004101606
Status: NEW → RESOLVED
Closed: 23 years ago → 21 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•