Mouse left click to reposition caret doesn't work properly over a number of pages

7 posts, 1 answers
  1. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 21 Sep 2012 Link to this post

    Has anyone else noticed that when you left mouse click to change the caret position for example from page 1 to page 3 that the RadRichTextBox scrolls back up to page 1 and that the caret doesn't position itself to location it was intended to be?

    However, if the caret is located at the bottom of page 1 and I left mouse click to position the caret at the top of page 2 then it works fine.

    RadRichTextBox only seems to randomly scroll when trying to reposition the caret over a large distance, i.e. from page 1 to 3.

    I'm using library version 2012.2.912.40.

    Thanks for your time,

    Rob
  2. Vasil
    Admin
    Vasil avatar
    124 posts

    Posted 26 Sep 2012 Link to this post

    Hi Robert,
    Unfortunately  we were not able to reproduce this issue. Maybe it is document or program implementation related.
    We would appreciate it if you could provide a sample document in .xaml format, code snippet of the source code and some steps to reproduce. In this way we could investigate further this failure and search for a solution. It would  be best if you manage to isolate the problem in a separate project which demonstrates it and send it back to us. We have already tried to reproduce the issue with the sample project you send us with your last ticket, but without success.

    Looking forward to your reply.



    Regards,
    Vasil
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 26 Sep 2012 Link to this post

    Hi Vasil,

    thanks for getting back to me.

    you can find an example application of my problem if you look up support ticket number 610082.
    The support ticket is related to another issue but my problem regarding the caret position also exists in the application.

    How to replicate the problem:
    1. Run the application provided in the zip folder.
    2. Once the application window has opened, click the button labelled "Open Document" at the top of the window and open the document provided with the example.
    3. Place the caret at the top of document.
    4. Scroll down to the bottom of the document.
    5. Try to place the caret on one of the last pages.
    6. You will notice that RadRichTextBox scrolls up and places the caret in a different location to what you have selected.

    I hope this help you replicate my problem.

    Thanks,

    Rob


  5. Vasil
    Admin
    Vasil avatar
    124 posts

    Posted 01 Oct 2012 Link to this post

    Hello Robert,

    Unfortunately, we are still not able to replicate the problem, even running your application with its document against 2012 Q2 SP2 (2012.2.912.40) version.

    Do you have any other documents that achieve this failure and could you send it back to us for testing purposes in a support ticket? It would be very helpful if you could record a video using Jing illustrating the behavior and showing the exact steps that we should execute to reproduce the behavior.

    Looking forward to your reply.

    Regards,
    Vasil
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 22 Nov 2012 Link to this post

    Hi,

    I've managed to figure out what was causing the problem.
    One thing to note is that my radrichtextbox's are hosted in RadPanes for a RadDocking control.

    Here's the code that was causing the issue:
    (I commented out the bottom line of code that sets Focus to the RadRichTextBox)
    public void RadPane_GotFocus(object sender, RoutedEventArgs e)
    {
        var currentPane = this.radDocking.ActivePane;
     
        if (currentPane is RadRichTextBoxAutoComplete && !currentPane.IsHidden)
        {
            //Get Document Customer Details
            this.paneCustomer.DataContext = ((RadRichTextBoxAutoComplete)currentPane).customerOrderDetails;
            this.paneCustomer.Tag = currentPane; //Set Reference to doc pane
     
            //Get Document Pricing
            this.radGridPricing.ItemsSource = ((RadRichTextBoxAutoComplete)currentPane).extrasPricing;
            this.radGridPricing.Tag = currentPane; //Set Reference to doc pane
     
            //Get Document Modifications
            this.radGridModifications.ItemsSource = ((RadRichTextBoxAutoComplete)currentPane).modificationList;
            this.radGridModifications.Tag = currentPane; //Set Reference to doc pane
     
            //((RadRichTextBoxAutoComplete)currentPane).radRichTextBox.Focus();
        }
    }

    Thanks again for your help,

    Rob
  7. Answer
    Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 28 Nov 2012 Link to this post

    Hello Rob,

    It seems that you have managed to track down the issue - glad to hear that.

    I am not quite sure I understand the whole logic of the snippet as the sample project in the thread you have mentioned does not include a RadDocking control and RadPane items and I were not able to create a repro project.

    In that regard, if you think that there is some incorrect behavior with the way the Focus() method works with this set-up and you need further assistance with resolving the issue, please let us know.

    Greetings,
    Iva Toteva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 29 Nov 2012 Link to this post

    Thanks Iva.

    When I get some time I will try and create an example of what was happening.
Back to Top
UI for WPF is Visual Studio 2017 Ready