[Mono-bugs] [Bug 339426] the attribute defaultbutton of the element <form> of ASP. NET pages doesn't seem to work

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 6 05:42:40 EST 2007


Juraj Skripsky <juraj at hotfeet.ch> changed:

           What    |Removed                                         |Added
                 CC|                                                |juraj at hotfeet.ch
             Status|RESOLVED                                        |REOPENED
         Resolution|FIXED                                           |

--- Comment #2 from Juraj Skripsky <juraj at hotfeet.ch>  2007-11-06 03:42:40 MST ---
The provided test case was a bit unfortunate. When you enter something into the
textbox and hit enter, the browser will automatically use the <input
type='submit'> element.

The test case below shows that the DefaultButton functionality is not
implemented (it works on MS.NET using IE) and the DefaultFocus functionality is
buggy (works on MS.NET using both IE or FF).

The code rendered for DefaultFocus is this:

<script type="text/javascript">

Maybe "WebForm_AutoFocus('Name2');" should be on a separate line? It's never
been called on FF (verified using Firebug).

Test case:
<script runat="server">
void Test(object o, EventArgs e) {
        Msg.Visible = true;

<form runat="server" defaultFocus="Name2" defaultButton="Button2">

SomeTextBox:<br />
<asp:TextBox runat="server" /><br />
DefaultTextBox:<br />
<asp:TextBox id="Name2" runat="server" /><br />

<asp:LinkButton text="SomeButton" runat="server" /><br />
<asp:LinkButton text="DefaultButton" id="Button2" onclick="Test" runat="server"
/><br />
<asp:LinkButton text="SomeButton2" runat="server" /><br />

<br />
<asp:Literal id="Msg" text="DefaultButton was clicked!" visible="false"


Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list