Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RichtextItem: how to tab out of it?

    soHi,
    I am trying the richt text editor, a question within a form it is nice to be able to tab to the next field. When the cursor is within the rich text editor this is not possible (the cursor does not move, no js error).

    This can be reproduced here:
    http://www.smartclient.com/index.jsp#fControlsRichTextEditor

    Is this on purpose, or how can I work around/solve this?

    gr. Martin

    #2
    Hi Martin
    Which browser are you working with here? Also - as a sanity check - do you have a doctype set?

    We rely on some native behavior within the RichTextEditor to support rich text editing. Tab keypresses are somewhat ambiguous within a rich editor -- should they insert a Tab character, or shift focus.

    Native behavior varies by browser.

    We may be able to apply a consistent behavior of taking focus from the element by applying an explicit keypress handler to the edit area (in either application or framework code), but the solution may be browser-specific - best to get a clear picture of your requirement so we can determine what's involved

    Regards
    Isomorphic Software

    Comment


      #3
      Hi,
      Thanks for the reply, indeed, I now tested with firefox and there the tab moves the focus to the next item/button.

      In chromium 23 on linux ubuntu the tab does nothing, it does not create a tab inside the text, neither does it move the focus to the next item.

      Either way would be fine with me (so move focus or insert a real tab). Although moving focus makes most sense for my case.
      As long as something happens so the user understands how to work with tab.

      gr. Martin

      Comment


        #4
        Interesting - we were checking on Chrome / Mac. We'll try your specific configuration and see if we can figure out how to resolve this.

        Regards
        Isomorphic Software

        Comment


          #5
          A quick follow up to note that a change has been made to the way RichTextItems are rendered which may address this issue for you. Please let us know if it's still a problem with the latest nightly build

          Regards
          Isomorphic Software

          Comment


            #6
            Bumped up.


            Hi, I have to resume this topic since it is not working (tested in 29-June-2013 nightly build):

            * Tab press doesn't make anything in Chrome in Ubuntu.
            * Shift+Tab press doesn't make anything in Chrome in Ubuntu.

            * Tab press adds a Tab character in Chrome in Windows and Mac
            * Shift+Tab press adds a Tab character in Chrome in Windows and Mac

            * Tab press focus to the next item in Firefox (Ubuntu, Windows and Mac) and in Internet Explorer.
            * Shift+Tab press focus to the previous item in Firefox (Ubuntu, Windows and Mac) and in Internet Explorer.


            It is clear that Chrome behavior is wrong in all platforms (in Ubuntu case even it doesn't make anything at all).

            Regards.
            Last edited by martintaal; 29 Jul 2013, 08:06.

            Comment


              #7
              Noted. This has been assigned to a developer for investigation.
              We'll let you know what we find.

              Regards
              Isomorphic Software

              Comment


                #8
                We've spent a little time looking into this.
                Essentially this is a native behavior which varies by browser. The RichTextCanvas class is making use of a built in feature (document.designmode) to provide the basic rich-text editing interface, and in Ubuntu Chrome this simply doesn't respond to Tab keypresses as you're seeing.

                In fact a Tab keypress is arguably ambiguous in an editor of this sort: Should it insert a Tab character, or shift focus.

                We are currently investigating the feasibility of natively intercepting and overriding this behavior cross-browser, such that developers can control which behavior occurs via an attribute on the RichTextItem / RichTextEditor class.
                If possible, this will most likely be a 9.1 feature, with possibly a port to 9.0p, depending on how involved the implementation turns out to be.

                We can keep this thread updated as we proceed.

                Regards
                Isomorphic Software

                Comment


                  #9
                  We've now made some changes to add a new feature - moveFocusOnTab to the 9.0 and 9.1 codebase. This will be present in the next nightly build and is settable on RichTextEditor and RichTextItem instances.
                  If set to true (the default), tab keypress will always take focus from the editor. If false, tab keypress will insert a "tab" character into the text.

                  Regards
                  Isomorphic Software

                  Comment

                  Working...
                  X