Firefox issue OnClientCommandExecuting

2 posts, 0 answers
  1. Hiram
    Hiram avatar
    6 posts
    Member since:
    May 2015

    Posted 20 Nov 2015 Link to this post

    I have a problem with firefox, I'm using this event(OnClientCommandExecuting) to cancel some(not all) shortcuts and works perfectly with chrome, when i try with firefox works very well with the shorcuts, except for the Shift+Enter  when i press this key combination in firefox the event is not even fired, could you help me please?


    function OnClientCommandExecuting(editor, args)
         var liTag = editor.getSelectedElement();
         var commandName = args.get_commandName();

  2. Ianko
    Ianko avatar
    1898 posts

    Posted 23 Nov 2015 Link to this post

    Hi Hiram,

    Shift+Enter executes a command only in Chrome and Safari. In Firefox and IE, the browser itself handles the Shift+Enter shortcut and adds a br tag in the content. 

    In this case you can handle the situation with two possible options:
    • Handling the onkeydown DOM event of the content area, capture the shortcut and execute the logic needed;

    • or Using the ShortcutManager object to unify the command to work in all browsers:
      <telerik:RadEditor ID="RadEditor1" runat="server" OnClientCommandExecuting="OnClientCommandExecuting" OnClientLoad="OnClientLoad">
          function OnClientLoad(editor, args) {
              editor.get_shortCutManager().addShortCut("ShiftEnterSafari", "Shift+Enter");
          function OnClientCommandExecuting(editor, args) {
              console.log("CommandName: " + args.get_commandName());


    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top