RadEditor: 2 bugs in Build 525

4 posts, 0 answers
  1. Derick
    Derick avatar
    9 posts
    Member since:
    Jul 2006

    Posted 26 May 2009 Link to this post

    Hi,

    I just downloaded the 525 build and these are a couple of bugs which are not yet resolved. They have been existing in the 402 build as well.

    (1) click on a rad editor field, the focus event fires, paste some content into it, the focus event fires again, there is no blur event fired in between these 2 focus events. this was discovered in the following scenario: store the value of the editor in the onfocus event handler, compare it to the value of the editor in the onblur event handler. If the value has changed, call a method that fires a postback. The method does not get called when one sets focus to the editor, pastes content and exits it without any further editing.

    (2) Related to the first one, click on an editor field, paste some text, then key in a few characters, exit the field, in the onblur, compare the value, postback to the server using RadAjaxManager, wait for the radloading panel to clear off, do not click on any other field, click back again it throws up a "htmlfile: unspecified error", the javascript line is "var _2f=_2e.getClientRects();".

    Would these be addressed in any fix soon?

    Derick
  2. Derick
    Derick avatar
    9 posts
    Member since:
    Jul 2006

    Posted 26 May 2009 Link to this post

    regarding (2) I missed out on mentioning that I have a tooltip that is displayed on focus, it is hidden onblur, going through the call stack in Visual Studio it can be traced to a tooltip method in the middle of the stack.

    Further issue
    (3) Click on the editor field, type one char (or even more) paste some text, on blur is fired. It also throws up an error "Microsoft JScript runtime error: Object required" at "return _18.scrollLeft;", the call stack traces back to "Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition(oWnd)" at the bottom of the stack.

    (4) The most bizzare one, I thought 525 had fixed it as I wasn't getting this initially after installing 525. I have 5 radeditors on a page, I invoke a __dopostback on one editor, it raises text_changed events for sometimes all editors, sometimes 2 or 3 and occassionally just the one editor (correct one). 3 of these editors are in a multi page tabstrip.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rumen
    Admin
    Rumen avatar
    12848 posts

    Posted 29 May 2009 Link to this post

    Hi Derick,

    The reported scenario is not so trivial for recreation and bug reproduction. That is why we kindly ask you to open a support ticket and attach a sample fully working project that demonstrates the problems. Once we are able to reproduce them we will examine your code and do our best to provide a solution.

    Please, specify the used browser where the problems appear and send if possible screenshots or video demonstrating the problem.

    Thank you for your assistance in advance!

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 29 May 2009 Link to this post

    Hello Derick,

    A quick follow-up (while we still maintain that your scenario is complex and to address the problems you are having with completing your advanced custom scenario it will be best to send us a fully working project that demonstrates the issues in a support ticket):

    1) Focus event is called before each paste operation to ensure that the editor does indeed have the focus. Likely, if the editor did have focus already, the onfocus event will still be raised. This is not a bug. There is nothing technically wrong with making sure it is the editor that has the focus before pasting content into it. One should not forget that HTML elements do not offer a isFocused() or hasFocus() method which could let the editor *know* whether ti currently has focus - and relying on the onblur method to *inform* about focus lost is simply not sufficient in all scenarios.

    2) In your scenario it seems that you are "replacing" the RadEditor as a result from the AJAX request. But also, in the same time you mention that you have added a RadToolTop to the editor on the client-side using client code. If this is indeed your scenario, please note that you need to make sure your tooltip is detached after the AJAX operation is complete. OR, alternatively, you might consider NOT updating the editor/editor's parent panel as a result of the AJAX request. If you need to simply set new content into the editor as a result of the AJAX request, you can do so by using client code. If you simply need to get the editor content on the server, you do not need to include the editor/editor panel as a control to be updated by the RadAjaxManager at all. The editor value will be sent anyway in each POST request, regardless of whether it will be used on the server or not. This is how MS AJAX works. For more info, please consider the following demo:
    http://demos.telerik.com/aspnet-ajax/editor/examples/autosave/defaultcs.aspx

    3) The description of the problems suggests that it very likely comes from adding custom code to the onblur method. Please test whether the error disappears after removing your code. If it indeed does, then for suggestions how to eliminate the error we will need to examine the actual code that you use. It could be again that it is a result of mixing AJAX updates with client-side event handlers that are attached, but never detached.

    4) If you refer to the server side OnTextChanged event, this event is raised in many more cases than actually needed "on purpose". There are three reasons for this - 1) IFRAMEs (such as the editor's content area) do not havea onchange event as textareas and inputs do. This is one major problem when determining whether content actually changed. 2) HTML is not text. Text can be easily compared - HTML cannot. Factors such as element attribute sequence, CSS settings, whitespace - can afect the editor "decision making process" and have it raise the "text changed" event even if the content was not actually changed. And the most important reason #3) is that browsers, most importantly IE make a great deal of changes to the content automatically when it is loaded in the browser. For example, IE would covnert all tags to upper case (which is not XHTML compliant). Many browser commands also produce non-XHTML compliant content - which the editor then needs to fix. It is not by chance that the editor features 20+ content filters that get executed automatically by default to correct for browser deficiencies and produce well-formed, valid XHTML. For more information please examine the following demo:
    http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

    Hence, what happens in reality is that content from the server gets loaded in the browser - browser screws it up - then the editor attempts to *fix" it - and as a result, it is often the case that, while the end HTML produces the same visual results, it is in fact not 100% identical to the original.

    I hope this information will be helpful to you in resolving the issues you have encountered.


    Sincerely yours,
    Tervel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top