Bug Report T274368
Visible to All Users

The CustomCommand event does not fire until a user switches from the Design tab to HTML and back

created 10 years ago

Hello,

I've noti ced strange inconsistency in ASPxHtmlEditor behavior when using external ribbon:

  1. Run the attached project.
  2. Click the MyName button on the ribbon. You'll see a single alert saying the ribbon event fired.
  3. Click the HTML tab and click the MyName button again - you'll see the same behavior.
  4. Click the Preview tab - same behavior.
  5. Now, switch back to Design and click the editable area.
  6. Click the MyName button again - this time and from now on you will get two events: one from the ribbon and another one from ASPxHtmlEditor (CustomCommand).

In order for the behavior to be consistent, you should always get two events as if it's the editor's native ribbon. You shouldn't have to click the Design area first in order for ASPxHtmlEditor to add a handler for ASPxRibbon events. Please fix this.

Nickolay, Software Architect
ClickHelp - Online Documentation Tool
http://clickhelp.co

Comments (1)
DevExpress Support Team 10 years ago

    Hello,

    Thank you for the information. I've passed this issue to our developers.
    We will update this ticket as soon as we get any results.

    Answers approved by DevExpress Support

    created 10 years ago (modified 9 years ago)

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    Additional information:

    ASPxHtmlEditor won't raise the CustomCommand/CommandExecuted event until it's not focused on the first page load. This behavior occurs since in certain scenarios one external Ribbon may be connected to multiple ASPxHtmlEditors, and we need to know that last focused control (connected to ASPxRibbon) before performing any actions.

      Show previous comments (9)
      Artem (DevExpress Support) 9 years ago

        Hi Nickolay,
        Thanks for the update. That's the behavior I pointed out earlier. ASPxHtmlEditor won't raise the CustomCommand/CommandExecuted event until it's not focused on the first page load. This behavior occurs since in certain scenarios one external Ribbon may be connected to multiple ASPxHtmlEditors, and we need to know that last focused control (connected to ASPxRibbon) before performing any actions. However, I noticed that in Chrome and Firefox, ASPxHtmlEditor is focused on the first load by default but behaves differently (in Firefox, the CustomCommand/CommandExecuted events are raised). Our R&D team will research this behavior  in the context of a separate thread:
        ASPxHtmlEditor - The CommandExecuted and CustomCommand events aren't raised on the first load in Chrome when the editor is focused by default

        We'll update it once we make any progress.

        CT CT
        ClickHelp Team 9 years ago

          Yes, the issue has been resolved with the hotfix created for the linked bug (https://www.devexpress.com/Support/Center/p/T292493.aspx). I think this case can be closed as well.
          Nickolay, Software Architect
          ClickHelp - Online Documentation Tool
          http://clickhelp.co

          Artem (DevExpress Support) 9 years ago

            Thanks for the clarification, Nickolay. We're always happy to help.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.