Issue with text selection using keyboard Ctrl+Left arrow

2 posts, 0 answers
  1. Bernard
    Bernard avatar
    1 posts
    Member since:
    Nov 2019

    Posted 27 Dec 2019 Link to this post

    There's an oddity when using shift and the left arrow key to select text, where it will skip the first character and then start over. This only happens when using the left arrow, and only at the last word in a line, which makes me think that there's something strange going on with how whatever this is treats the ends of lines.

    Highlighting using arrow keys top to bottom and right to left seems fine. But highlighting left to right and bottom to top, seems to cut off highlighting and it doesn't highlight the text as you expect, but instead un-highlights sections you've previously highlighted. 

    Reproducible here https://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx 

    Any help would be appreciated.

  2. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 30 Dec 2019 Link to this post

    Hi Bernard,

    Happy Holidays!

    Thank you for reporting this issue. It is a known one so please vote for it in the this feedback item.

    Until it gets resolved you can workaround the issue by overriding the _onKeyUp internal function of RadEditor:

    <script>
        if (Telerik.Web.Browser.chrome) {
            Telerik.Web.UI.RadEditor.prototype._onKeyUp = function (e) {
                this._clearInlineEditModeTabListener(e.keyCode);
     
                this._cleanUpAfterDelete();
     
                if (!this._shortcutHit && Telerik.Web.UI.Editor.Utils.isTypingKey(e)) {
                    this._normalizeInsertedText();
                }
     
                //NEW UNDO/REDO
                if (this._hasDeleteExecuted) {
                    //No such command when in IE back is called when selection is table or img
                    if (this._pendingTextTypeCmd)
                        this.executeCommand(this._pendingTextTypeCmd);
                    this._pendingTextTypeCmd = null; //!
                    this._hasDeleteExecuted = false;
                    return;
                }
     
                if (this._pendingTextTypeCmd) {
                    return;
                }
     
                if (this._pendingCutCommand) {
                    this.executeCommand(this._pendingCutCommand);
                    this._pendingCutCommand = null;
                }
     
                if (this._shortcutHit) {
                    return false;
                }
                // this.raiseEvent("selectionChange", Sys.EventArgs.Empty);
            }
        }
    </script>
    <telerik:RadEditor ID="RadEditor1" runat="server">
        <Content>This <strong>strange</strong> thing</Content>
    </telerik:RadEditor>

    Regards,
    Rumen
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top