[Mozilla+JavaScript] Shouldn’t this bug be confirmed? – PHP

  php

Q(Question):

I come across with this topic because it is more or less related to PHP.

Sometimes we implement a PHP script that displays a form which has a
SELECT that should have a value by default. If the SELECT input control
has a size bigger than "1" and the option selected is not in the first
elements (so as the size of the SELECT doesn’t allow to view the item
selected), Mozilla browser won’t scroll the SELECT control to the item
selected! However, IE6 has this behaviour.

There is a bug in Mozilla about this issue, and I cannot figure why this
bug isn’t yet, at least, CONFIRMED.

So, if you are interested in this bug, plase, click the URL below and
vote for the bug (to vote bugs you need to register a bugzilla account,
which can spend only 5 minutes of your time).

http://bugzilla.mozilla.org/show_bug.cgi?id=224023

Regards,

knocte
PS: If you don’t use Windows XP, it would also be useful to know if this
bug is reproducible in other operating systems. If yes, please post a
comment about it.

A(Answer):

knocte wrote:

I come across with this topic because it is more or less related to PHP.

Sometimes we implement a PHP script that displays a form which has a
SELECT that should have a value by default. If the SELECT input control
has a size bigger than "1" and the option selected is not in the first
elements (so as the size of the SELECT doesn’t allow to view the item
selected), Mozilla browser won’t scroll the SELECT control to the item
selected! However, IE6 has this behaviour.

There is a bug in Mozilla about this issue, and I cannot figure why this
bug isn’t yet, at least, CONFIRMED.

If I’m understanding your description correctly, the following example
code should produce the error that is troubling you:

<html>
<head>
<title>
Test SELECT element
</title>
<meta name="GENERATOR" content="Arachnophilia 5.2" />
<meta name="FORMATTER" content="Arachnophilia 5.2" />
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff"
vlink="#800080" alink="#ff0000">

<select size="4">
<option>Hello</option>
<option>Goodbye</option>
<option selected="true">Bonjour</option>
<option>Au revoir</option>
<option>Bon soir</option>
<option>Whatever</option>
</select>

</body>
</html>

However, I get a select box that offers a scrollbar, and I can select
any of the elements listed in my example.

Have I understood the problem correctly?

Are you writing sound HTML/XHTML code? (With closing tags for all
elements that require them; and quotes around all element properties?)
Mozilla is a standards-based browser, so it requires good document
structures. IE6 isn’t worth using to test Web pages.

What version of Mozilla are you using?

Have I misunderstood the problem? (The title mentions Javascript, but
your description doesn’t.)

Bob
London, UK
echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk"

A(Answer):

knocte wrote:

I come across with this topic because it is more or less related to PHP.

How is this related to PHP at all? This is definately an HTML/browser
issue, nothing to do with PHP.


Justin Koivisto – sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

A(Answer):

Robert Downes escribió:

Have I misunderstood the problem? (The title mentions Javascript, but
your description doesn’t.)

You have misunderstood the problem. The requirements for this bug to be
reproduced are:

– Have a SELECT element with size="x" (x bigger than 1).
– Have an item in the select whose position is bigger than x.
– Have the SELECT element inside a TD tag.
– Have the attribute align="center" inside the TD tag.

For example:

<html>
<head>
<title>
Test SELECT element
</title>
<meta name="GENERATOR" content="Arachnophilia 5.2" />
<meta name="FORMATTER" content="Arachnophilia 5.2" />
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff"
vlink="#800080" alink="#ff0000">
<table>
<tr>
<td align="center">
<select size="2">
<option>Hello</option>
<option>Goodbye</option>
<option>Bonjour</option>
<option>Au revoir</option>
<option>Bon soir</option>
<option selected="true">Whatever</option>
</select>
</td>
<td>
Other TD
</td>
</tr>
<tr>
<td>
Other TD
</td>
<td>
Other TD
</td>
</tr>

</body>
</html>

If you display this page on Mozilla, the SELECT won’t scroll to the last
option.

Try just to remove the align="center" attribute to see the correct
behaviour.

Regards,

knocte

A(Answer):

knocte wrote:

Robert Downes escribió:

Have I misunderstood the problem? (The title mentions Javascript, but
your description doesn’t.)

You have misunderstood the problem. The requirements for this bug to be
reproduced are:

– Have a SELECT element with size="x" (x bigger than 1).
– Have an item in the select whose position is bigger than x.
– Have the SELECT element inside a TD tag.
– Have the attribute align="center" inside the TD tag.

For example:

<html>
<head>
<title>
Test SELECT element
</title>
<meta name="GENERATOR" content="Arachnophilia 5.2" />
<meta name="FORMATTER" content="Arachnophilia 5.2" />
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080"
alink="#ff0000">
<table>
<tr>
<td align="center">
<select size="2">
<option>Hello</option>
<option>Goodbye</option>
<option>Bonjour</option>
<option>Au revoir</option>
<option>Bon soir</option>
<option selected="true">Whatever</option>
</select>
</td>
<td>
Other TD
</td>
</tr>
<tr>
<td>
Other TD
</td>
<td>
Other TD
</td>
</tr>

</body>
</html>

If you display this page on Mozilla, the SELECT won’t scroll to the last
option.

Try just to remove the align="center" attribute to see the correct
behaviour.

Using the code you supply above, I still can scroll down and select
other items, even though there is no </table> closing tag.

However, I am using a version of Mozilla that claims to be 1.7a, so
possibly the problem you are seeing has been fixed in more recent code.

Bob
London, UK
echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk"

A(Answer):

Robert Downes escribió:

knocte wrote:

Robert Downes escribió:

Have I misunderstood the problem? (The title mentions Javascript, but
your description doesn’t.)

You have misunderstood the problem. The requirements for this bug to
be reproduced are:

– Have a SELECT element with size="x" (x bigger than 1).
– Have an item in the select whose position is bigger than x.
– Have the SELECT element inside a TD tag.
– Have the attribute align="center" inside the TD tag.

For example:

<html>
<head>
<title>
Test SELECT element
</title>
<meta name="GENERATOR" content="Arachnophilia 5.2" />
<meta name="FORMATTER" content="Arachnophilia 5.2" />
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff"
vlink="#800080" alink="#ff0000">
<table>
<tr>
<td align="center">
<select size="2">
<option>Hello</option>
<option>Goodbye</option>
<option>Bonjour</option>
<option>Au revoir</option>
<option>Bon soir</option>
<option selected="true">Whatever</option>
</select>
</td>
<td>
Other TD
</td>
</tr>
<tr>
<td>
Other TD
</td>
<td>
Other TD
</td>
</tr>

</body>
</html>

If you display this page on Mozilla, the SELECT won’t scroll to the
last option.

Try just to remove the align="center" attribute to see the correct
behaviour.

Using the code you supply above, I still can scroll down and select
other items, even though there is no </table> closing tag.

However, I am using a version of Mozilla that claims to be 1.7a, so
possibly the problem you are seeing has been fixed in more recent code.

I am not saying that you can’t scroll and select. I am saying that when
you open the page the select must be scrolled before you do anything!

Mozilla 1.7a? How can that be possible? Mozilla 1.6 Final is not
released yet.

Regards,

knocte

PS: If you still have more doubts about the bug, please refer to
http://bugzilla.mozilla.org/show_bug.cgi?id=224023 to read the entire
description of the bug.

A(Answer):

knocte wrote:

I am not saying that you can’t scroll and select. I am saying that when
you open the page the select must be scrolled before you do anything!

Oh, I thought you meant Mozilla would not scroll down to the item at all.

I’m not sure if the developers would consider that a bug. If you are
using PHP to generate the select element, then perhaps you can write a
piece of code that puts the ‘selected="true"’ option to the top of the
list, so it has to appear first.
Mozilla 1.7a? How can that be possible? Mozilla 1.6 Final is not
released yet.

I’m wondering that myself. I went to the developer section of the
Mozilla site, and downloaded the nightly build, and what I got is now
calling itself version 1.7a.

Bob
London, UK
echo Mail fefsensmrrjyaheeoceoq\! | tr "jefroq\!" "@obe.uk"

LEAVE A COMMENT