+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Setting the default button on enter

Setting the default button on enter

4 posts, 0 answered
  1. Jason Green
    Jason Green avatar
    53 posts
    Registered:
    18 Sep 2009
    06 Jul 2011
    Link to this post

    I am not having luck with setting a default button on enter. 

    Typically, we simply post a panel, place all the controls in the panel, and set the defaultbutton property on the panel to go to the asp:button that we want it to go to.

    Normally this works.

    But not in my Sitefinity sites.  I have had to hack and trick the system into getting proper “enter key” behavior, and have only been able to partially get it to work on some pages. 

    Do you know why?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Jul 2011
    Link to this post
    Hi Jason,

    Have you tried to set the focus on the button or add some js function that triggers an object of your page when you make a click? Note that there could be only one focused object, so check if this is the problem.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Jason Green
    Jason Green avatar
    53 posts
    Registered:
    18 Sep 2009
    06 Jul 2011
    Link to this post
    The panel default button doesn't seem to work at all, and the JavaScript I added does the trick part of the time.  It seems the newsletter signup control seems to take control of the enter press when it is on the same page (but only sometimes).

    You bring up a good point - I didn't check but maybe the newsletter control is also using some JavaScript and we are conflicting in getting enter control.  I will check into that.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Jul 2011
    Link to this post
    Hello Jason,

    Try isolating the issue by putting your control on a new page without other controls so you can easily narrow down the the issue and look into your implementation or find a solution related to the interaction between several controls.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered