7.0.3 Search Enter Key Bug

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
William_firefold
Commander (CMDR)
Commander (CMDR)
Posts: 186
Joined: Fri Aug 01, 2008 8:38 am

7.0.3 Search Enter Key Bug

Post by William_firefold » Tue Jul 28, 2009 12:52 pm

We are getting a strange problem with the keyword box on the search page. We have fixed most of the enter key bugs on the other pages on the site, but this one is being stubborn.
When you enter the keyword and hit enter, it defaults to the search box at the top of the page. When we remove the top search box, it defaults to the reset button in the editor panel at the bottom.
How can I force it to default to the left sidebar?

If you have an idea, please help, as I am out of them.

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: 7.0.3 Search Enter Key Bug

Post by afm » Tue Jul 28, 2009 1:06 pm

If you wrap the left column search box in an asp:Panel and set DefaultButton="Control ID of Search Button", then ASP.NET will take care of mapping the enter key to the correct search button. For example,

Code: Select all

<asp:Panel id="searchwrap" runat="server" DefaultButton="SearchButton">
  ... search fields ...
  <asp:Button id="SearchButton" runat="server" />
</asp:Panel>
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

User avatar
William_firefold
Commander (CMDR)
Commander (CMDR)
Posts: 186
Joined: Fri Aug 01, 2008 8:38 am

Re: 7.0.3 Search Enter Key Bug

Post by William_firefold » Tue Jul 28, 2009 1:31 pm

Thanks for the quick reply, but this was the old solution that I already tried which did not work here.
I wrapped everything and it still defaulted to the top box. Here is the complete .ascx file that we are using. you will see that the box already has a default button set.

Code: Select all

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategorySearchSidebar.ascx.cs" Inherits="ConLib_CategorySearchSidebar" %>
<%--
<conlib>
<summary>An ajax enabled search bar that displays products in a grid format. Allows customers to narrow and expand by category, manufacturer, and keyword in a search style interface.  This search bar must be used in conjunction with the Category Grid content scriptlet.</summary>
</conlib>
--%>
<%@ Register Assembly="CommerceBuilder.Web" Namespace="CommerceBuilder.Web.UI.WebControls" TagPrefix="cb" %>
<ajax:UpdatePanel ID="SearchFilterAjaxPanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
<div id="customSidebar">
	<div class="header"><h2><asp:Localize ID="SearchFilterHeader" runat="server" Text="Product Finder"></asp:Localize></h2></div>
    <div class="searchArea">
    <asp:Panel ID="SearchPanel" runat="server" DefaultButton="KeywordButton">
            <asp:Panel ID="NarrowByKeywordPanel" runat="server">
                <h3 class="searchCriteria">Narrow by Keyword</h3>
                <div align="center">
                    <asp:TextBox ID="KeywordField" runat="server" Width="120px" MaxLength="60" EnableViewState="false" ValidationGroup="SearchSideBar"></asp:TextBox>
                    <asp:LinkButton ID="KeywordButton" runat="server" SkinID="Button" Text="GO" EnableViewState="false"  ValidationGroup="SearchSideBar"/>
                    <asp:RequiredFieldValidator ID="KeywordRequired" runat="server" ControlToValidate="KeywordField" Text="*" ErrorMessage="Keyword is required." ValidationGroup="SearchSideBar" Display="none"></asp:RequiredFieldValidator>
                    <cb:SearchKeywordValidator ID="KeywordValidator" runat="server" ControlToValidate="KeywordField" Text="*" ErrorMessage="Search keyword must be at least {0} characters in length excluding spaces and wildcards." ValidationGroup="SearchSideBar" Display="none"></cb:SearchKeywordValidator>
                </div>
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="SearchSideBar" />
            </asp:Panel>
    </asp:Panel>
    </div>
    <div class="searchArea">
    <asp:Panel ID="ExpandResultPanel" runat="server">
	            <h3 class="searchCriteria">Expand Your Result</h3>
                <asp:Repeater ID="ExpandCategoryLinks" runat="server" OnItemDataBound="ExpandCategoryLinks_ItemDataBound" EnableViewState="false">
                    <ItemTemplate></ItemTemplate>
                </asp:Repeater>
                <div class="removeKeyword">
                <asp:LinkButton ID="ExpandManufacturerLink" runat="server" Text="" Visible="false"  Cssclass="searchCriteria" EnableViewState="false"></asp:LinkButton>
                <asp:LinkButton ID="ExpandKeywordLink" runat="server" Text="" Visible="false"  Cssclass="searchCriteria" EnableViewState="false"></asp:LinkButton>
				</div>
            </asp:Panel>
    </div>
    <div class="searchArea">
    <asp:Panel ID="NarrowByCategoryPanel" runat="server">
	            <h3 class="searchCriteria">Narrow by Category</h3>
                <asp:DataList ID="NarrowByCategoryLinks" runat="server" DataKeyField="CategoryId"  OnItemDataBound="NarrowByCategoryLinks_ItemDataBound" EnableViewState="false">
                    <ItemTemplate></ItemTemplate>
                </asp:DataList>
            </asp:Panel>
    </div>
    <div class="searchArea">
    <asp:Panel ID="NarrowByManufacturerPanel" runat="server">
                <h3 class="searchCriteria" >Narrow by Manufacturer</h3>
                <asp:DataList ID="ManufacturerList" runat="server" DataKeyField="ManufacturerId"  OnItemDataBound="ManufacturerList_ItemDataBound" EnableViewState="false">
                    <ItemTemplate></ItemTemplate>
                </asp:DataList>
                <asp:LinkButton ID="ShowAllManufacturers" runat="server" Text="See All &raquo;" CssClass="showAll" EnableViewState="false"></asp:LinkButton>
            </asp:Panel>
        </div>
		<asp:HiddenField ID="VS" runat="server" />
		</div>
    </ContentTemplate>
</ajax:UpdatePanel>

User avatar
William_firefold
Commander (CMDR)
Commander (CMDR)
Posts: 186
Joined: Fri Aug 01, 2008 8:38 am

Re: 7.0.3 Search Enter Key Bug

Post by William_firefold » Tue Jul 28, 2009 1:45 pm

I just tested in IE, and the keyword box works as normal in IE7 but fails in Firefox. Could this be a problem with the implementation of ASP, or maybe form specifications in firefox?

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: 7.0.3 Search Enter Key Bug

Post by afm » Tue Jul 28, 2009 4:00 pm

I was just going to ask if it worked in IE and not in FireFox. See,

http://kpumuk.info/asp-net/using-panel- ... n-asp-net/
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: 7.0.3 Search Enter Key Bug

Post by kastnerd » Tue Sep 22, 2009 11:06 am

I am having the problem in IE8 on my site.

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: 7.0.3 Search Enter Key Bug

Post by kastnerd » Tue Sep 29, 2009 6:55 am

Is this search and the enter key a bug on my site or with able? http://67.225.187.60/

DBounlom
Lieutenant (LT)
Lieutenant (LT)
Posts: 62
Joined: Wed Sep 09, 2009 1:26 pm

Re: 7.0.3 Search Enter Key Bug

Post by DBounlom » Wed Oct 28, 2009 11:37 am

Any help greatly appreciated for the following...

If a user logs in by typing in the email and password, then subsequently hitting the enter key, everything is fine on IE 8, Firefox, and Chrome.

However, if a user requests a password reset, AC7 will generate the new password assistance page. After the user types in the password twice on this page and hits the enter key, the enter key is defaulting to the top of the search box. This error happens on IE8, Firefox, and Chrome. Is this a bug? Thanks.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: 7.0.3 Search Enter Key Bug

Post by mazhar » Thu Oct 29, 2009 5:27 am

DBounlom wrote:Any help greatly appreciated for the following...

If a user logs in by typing in the email and password, then subsequently hitting the enter key, everything is fine on IE 8, Firefox, and Chrome.

However, if a user requests a password reset, AC7 will generate the new password assistance page. After the user types in the password twice on this page and hits the enter key, the enter key is defaulting to the top of the search box. This error happens on IE8, Firefox, and Chrome. Is this a bug? Thanks.
I have logged this issue here
http://bugs.ablecommerce.com/show_bug.cgi?id=8493
For a quick fix you need to edit ConLib/MyCredentials.ascx file and set container asp panel default button to SaveButton and then change save button from LinkButton to simple asp button and finally remove its SkinId property.

Like

Code: Select all

<asp:Panel ID="EditPanel" runat="server" DefaultButton="SaveButton">
and

Code: Select all

<asp:Button ID="SaveButton" runat="server" Text="Save" OnClick="SaveButton_Click" CssClass="button" />

DBounlom
Lieutenant (LT)
Lieutenant (LT)
Posts: 62
Joined: Wed Sep 09, 2009 1:26 pm

Re: 7.0.3 Search Enter Key Bug

Post by DBounlom » Thu Oct 29, 2009 12:18 pm

Thanks Mazhar! The fix worked. However, my previous post was referring to the bug on ConLib / PasswordHelpPage.ascx. Regardless, I fixed the bug in MyCredentials.ascx using your updated code, and it works great. I also added that code to PasswordHelpPage.ascx, and it seems to work fine as well. Can you update the bugzilla post to show the bug on the PasswordHelpPage.ascx as well?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: 7.0.3 Search Enter Key Bug

Post by mazhar » Fri Oct 30, 2009 4:18 am

DBounlom wrote:Thanks Mazhar! The fix worked. However, my previous post was referring to the bug on ConLib / PasswordHelpPage.ascx. Regardless, I fixed the bug in MyCredentials.ascx using your updated code, and it works great. I also added that code to PasswordHelpPage.ascx, and it seems to work fine as well. Can you update the bugzilla post to show the bug on the PasswordHelpPage.ascx as well?
Thanks for the feedback, I have updated the bug report.

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: 7.0.3 Search Enter Key Bug

Post by kastnerd » Thu Mar 18, 2010 10:04 am

I am testing google Chrome, and at some pages when i click enter it will submit a different button then IE would.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: 7.0.3 Search Enter Key Bug

Post by mazhar » Thu Mar 18, 2010 11:08 am

Could you please provide the names for those pages and locations which seems to have cross browser issue

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: 7.0.3 Search Enter Key Bug

Post by kastnerd » Mon Mar 22, 2010 10:26 am

Is there a stock Able demo some place to test these?

Post Reply