Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7620139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:51:59+00:00 2026-05-31T03:51:59+00:00

The code below has a link to cause a post back (asynchronous or not)

  • 0

The code below has a link to cause a post back (asynchronous or not) followed by div with a top-padding of 5000 🙂 – and the new HtmlEditorExtender control found in the Ajax Control Toolkit (4.1.51116).

The Problem:

Clicking the link at the top of the page, causes the HtmlEditorExtender to steal the focus, scrolling all the way down to the bottom.

The Question:

Does anyone know if this is a known bug?
Can anyone think of a work around?

I can’t even think how to ever use this control on a page with any other controls that cause postbacks!

The Code:

    <div>
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <asp:LinkButton runat="server">test asynch postback - PLEASE DONT SCROLL DOWN!! :)</asp:LinkButton>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
        <div style="padding-top: 5000px">
             Nooooooooooooooooooooooooo!!!!
            <asp:TextBox ID="txtPageBody" TextMode="MultiLine" Width="200px" runat="server" />
            <act:HtmlEditorExtender ID="htmlPageBody" runat="server" TargetControlID="txtPageBody" >
                <Toolbar>
                    <act:Bold />
                </Toolbar>
            </act:HtmlEditorExtender>
        </div>
    </div>

HtmlEditorExtender should be added as a tag, but don’t have the reputation 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:52:00+00:00Added an answer on May 31, 2026 at 3:52 am

    override the function that is stealing the focus on your page, with the focus line removed:

    if (Sys.Extended && Sys.Extended.UI && Sys.Extended.UI.HtmlEditorExtenderBehavior && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype && Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit) {
    Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit = function () {
    //html encode
    var char = 3;
    var sel = null;
    
    if (Sys.Browser.agent != Sys.Browser.Firefox) {
    if (document.selection) {
    sel = document.selection.createRange();
    sel.moveStart('character', char);
    sel.select();
    }
    else {
    sel = window.getSelection();
    sel.collapse(this._editableDiv.firstChild, char);
    }
    }
    
    //Encode html tags
    this._textbox._element.value = this._encodeHtml();
    };
    }
    

    from here:

    http://ajaxcontroltoolkit.codeplex.com/workitem/27026

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just wondering why the vbs code in the link below is not
The code below works great except the email has all the text on one
Why does the code below result in org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed? The
I suppose button should has Close title in the code below, but it has
UPDATE 2011.09.13 This bug has been resolved by Adobe. The example code below now
I've got a simple question but it has got me confounded. The code below
This has been bothering me lately- when I use some code like below to
I have a chart (code to replicate will be below) that has two lines
Below I present you some code which has completely been butchered by me. $(.gig).hover(function()
Which one below is correct? First code has no quotes in the $_GET array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.