Closed Bug 388794 Opened 12 years ago Closed 11 years ago

[FIX]No x/y coords sent when an image input without an image frame is triggered

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: travlos7, Assigned: bzbarsky)

References

()

Details

(Keywords: regression)

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; el; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; el; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5

when you disable javascripts and images then if you click the alternate text nothing happens.
i tryied the same thing with netscape,ie,opera and it worked fine...


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Keywords: highrisk
Could you provide a minimal html testcase (as attachment)?
you can have a look at the problem if you go to test.bookcyprus.com. Disable images and javascripts.
press the search button in the page and in the next page there are two image buttons next . They just don't wotk. if you enable javascript or images they work.
I have tested it with opera ,ie. the work fine... i have searched a lot around the web and i found a forum describing the similar problem, just yesterday where they say the same thing. it 's a bugg of mozilla...
Here, the page take a long time after I pressed "next" but results are displayed fine. 

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 ID:2007071317
First thnks for your quick reply.
A where you can see it better is..
http://test.bookcyprus.com/Pages/HotelSbyS2.aspx?searchagain=hotelsbys1&ds=&dsn=&in=3%2f8%2f2007&fd=8%2f8%2f2007&sr=0&lc=0&lcn=Any&sc=0&scn=2%20STAR&ht=0&hn=&al=1%2c35%231%2c35%23&rm=&rmn=&sv=&svn=

Be SURE TO DISABLE IMAGES AND JAVASCRIPT....
if you press the next it gives you the impression of doing a post back but the results don't change at all. it's the same page....
sorry but someone had remove the alt before. ths image buttons have alt next 
and previous... 
look for sommethnig like this
54  records | page 1 /6| | previous | next 
nest is the alt for the image button...
if you press it the page does't cahnge.. try it on ie or opera.. to see the differnce...
Keywords: highrisk
Version: unspecified → 2.0 Branch
Attached image screenshot
Here's what I see, where should I click ?
From the page source:
<script language="javascript" type="text/javascript">
<!--
	function __doPostBack(eventTarget, eventArgument) {
		var theform;
		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
			theform = document.MainForm;
		}
		else {
			theform = document.forms["MainForm"];
		}
		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
		theform.__EVENTARGUMENT.value = eventArgument;
		theform.submit();
	}
// -->
</script>

So with JS disabled... But I'm not sure I understand correctly the problem. Will try later with IE.
Component: Disability Access → Layout: Form Controls
Product: Firefox → Core
QA Contact: disability.access → layout.form-controls
Version: 2.0 Branch → 1.8 Branch
Reporter: have you tested this with a recent version of Firefox 3 test builds?

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
regis someone had switched the server to an old version. now you can look at the problem in the attachment you can see the alt of the imagebuttons that don' t work.
i have also tested it in firefox 3 but nothing happend.. the problem still remains..
when you click next nothing happens...
test in ie to see the difference..
Thanks
Version: 1.8 Branch → Trunk
I think your onclick -- i.e. "ShowLoad()" -- for the image relies on a blocked script (because JS is disabled)
i thought show at the beggining but if you disable just javascript and not images the page works fine...
have you tested it on ie or opera it works just fine...

(In reply to comment #9)
> i thought show at the beggining but if you disable just javascript and not
> images the page works fine...
This don't void what I said in comment 9
> have you tested it on ie or opera it works just fine...
No, I don't know how to disable JS in IE7 and don't have any opera installation under the hand.

i know that and that's what i don't how come it doesn't work if you disable images or js but if you disable them both it doesn't work...
Here, it works only when image are displayed whatever is JS status

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7pre) Gecko/2007072205 Minefield/3.0a7pre ID:2007072205
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 ID:2007071317

-> updating summary
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: imagebutton does not work → image onclick doesn't work when "Load image automatically" is disabled
Régis, can you possibly attach the HTML page that shows the problem to the bug, if you can reproduce it?  The server at test.bookcyprus.com is not responding when I try to access it....

Is the problem just that no x/y coordinates are sent when submitting using an image input that got replaced by alt text and that the server expects to get x/y in this case and fails if it doesn't?  Does tabbing to the input and then hitting enter fail the same way?
Flags: blocking1.9?
Attached file site files
(In reply to comment #13)
> Régis, can you possibly attach the HTML page that shows the problem to the
> bug, if you can reproduce it?  The server at test.bookcyprus.com is not
> responding when I try to access it....
It seems the bug relies on the dynamic part of the site, so I will attech the generated HTML but I can't reproduce with it

> Is the problem just that no x/y coordinates are sent when submitting using an
> image input that got replaced by alt text and that the server expects to get
> x/y in this case and fails if it doesn't?  Does tabbing to the input and then
> hitting enter fail the same way?
The x/y solution looks probable to me (what is strange is that reporter said it works with Opera..), changing a select value (there is no edit) make the form works as expected.

PS: URL WFM
Attachment #276255 - Attachment mime type: application/octet-stream → application/zip
Uh...  So the attached files have a disabled "next" link (since there is only one page of results).  The URI in comment 4 gives no results at all.

Can someone give me actual steps to reproduce this bug?
Keywords: qawanted
OK, I've gotten the site at http://test.bookcyprus.com to respond, and turning off images just makes the prev/next buttons disappear because they have alt="" set (who designed this site anyway?).

So again: How do I reproduce this bug? 
I can:
1/ load http://test.bookcyprus.com
2/ click "Next"
3/ disable image in FF options 
4/ refresh the page
5/ load DOMi, click "find a node"
6/ click the "xx  records | page 1 /2| |" 
7/ lookup for <INPUT src="../Images/nextOn_1.gif" ..
8/ set its alt text to "next"
9/ click "next" on the bookcyprus page 

that's all: you still are on the page 1 and not on the page 2

NB: Sorry about the DOMi steps but the test url don't have any alt text anymore..
Régis, thank you.  That does the trick!

Changing our code to pass "x=0&y=0" instead of "x=&y=" when there is no image does in fact fix the test site.  Opera passes those when the image control is triggered by enter if the image is visible, and passes click coordinates when clicking on the alt text.  We pass "x=0&y=0" when the image control is triggered by enter if the image is visible.

See bug 122238 for the discussion that led to us implementing our current behavior.  Since we've had this behavior since early 2004, and this is the first bug report on it that I see, I'm tempted to claim this is a bug in the site...  If we decide we do care, sending x=0&y=0 is pretty easy.  Under no circumstances should we do what Opera does.

In any case, not a layout issue at all.
Component: Layout: Form Controls → DOM: HTML
Keywords: qawanted
QA Contact: layout.form-controls → general
Boris, thanks for your detailled answer.
Not a blocker since this isn't a regression. At this point i'm also very confused what is the actual problem here. "onclick" usually refers to javascript actions, but that doesn't seem to be what this bug is about.
Flags: blocking1.9? → blocking1.9-
> Not a blocker since this isn't a regression

Actually, it's a regression from 1.7 in a lot of cases: we used to show a broken image placeholder in a lot more cases than we do now.

> At this point i'm also very confused what is the actual problem here.

Resummarized to make it clear.
Keywords: regression
Summary: image onclick doesn't work when "Load image automatically" is disabled → No x/y coords sent when an image input without an image frame is triggered
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Component: DOM: HTML → DOM: Core & HTML
HTML5 says to send 0,0.
Attached patch FixSplinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #345674 - Flags: superreview?(jonas)
Attachment #345674 - Flags: review?(jonas)
Summary: No x/y coords sent when an image input without an image frame is triggered → [FIX]No x/y coords sent when an image input without an image frame is triggered
Attachment #345674 - Flags: superreview?(jonas)
Attachment #345674 - Flags: superreview+
Attachment #345674 - Flags: review?(jonas)
Attachment #345674 - Flags: review+
Pushed changeset 3e39748e01cd.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.