Announcement

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

    RichTextItem change handler broken on IE

    Hi,

    After an update to the latest version of smartgwt (SmartClient Version: v12.0p_2018-04-18/LGPL Development Only (built 2018-04-18)) we're having some problems with RichTextItem component in Internet Explorer version 11.0.96. We're trying to add some change/changed handlers to mark an element as dirty, but it turn out that in IE this change event is does not been fired. In other browsers (chrome, firefox) it is working as expected.
    In Smartgwt version 4.1 and older gwt version that was working even on IE.


    Code Example:
    Code:
    RichTextItem widget = new RichTextItem();
    widget.addChangeHandler(new ChangeHandler() {
    
          @Override
          public void onChange(ChangeEvent event) {
    
            Log.warn("onChange event");
          }
        });
    When we look at the IE or SmartClient Developer console we've got some warn there for every click event in the editor area.
    Code:
    *13:39:07.660:focusin2:WARN:Log:Trying to derive keyName from the charsetValueToKeyNameMap: 107 = 'undefined'
    Is there any chance to get that fixed or perhaps any workaround ?

    #2
    We've been unable to reproduce this issue using the latest 12.0p branch, testing in IE 11 running on Windows 10.

    Here's our complete test case (based off your snippet):

    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.RichTextItem;
    import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
    import com.smartgwt.client.widgets.form.fields.events.ChangeHandler;
    
    public class RichTextItemChange implements EntryPoint {
    
        @Override
        public void onModuleLoad() {
            RichTextItem widget = new RichTextItem();
            widget.addChangeHandler(new ChangeHandler() {
    
                  @Override
                  public void onChange(ChangeEvent event) {
    
                    SC.logWarn("onChange event");
                  }
                });
    
            DynamicForm testForm = new DynamicForm();
            testForm.setItems(widget);
    
            testForm.draw();
    
            SC.showConsole();
        }
    
    
    }
    It seems likely there's some additional code in your testing application which is responsible for the error. If you'd like us to look again, please post a complete standalone test case (similar to the above EntryPoint class) which we can run to demonstrate the issue.

    Regards
    Isomorphic Software

    Comment


      #3
      Hello Isomorphic,

      We manage to reproduce this issue on Hello World application same as you just provided. This line of code made a change:
      Code:
      SC.setScreenReaderMode(true);
      So this this the whole test case:
      Code:
      package com.smartgwt.sample.client;
      
      import com.google.gwt.core.client.EntryPoint;
      import com.smartgwt.client.util.SC;
      import com.smartgwt.client.widgets.form.DynamicForm;
      import com.smartgwt.client.widgets.form.fields.RichTextItem;
      import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
      import com.smartgwt.client.widgets.form.fields.events.ChangeHandler;
      
      public class RichTextItemChange implements EntryPoint {
      
          @Override
          public void onModuleLoad() {
              SC.setScreenReaderMode(true);
              RichTextItem widget = new RichTextItem();
              widget.addChangeHandler(new ChangeHandler() {
      
                    @Override
                    public void onChange(ChangeEvent event) {
      
                      SC.logWarn("onChange event");
                    }
                  });
      
              DynamicForm testForm = new DynamicForm();
              testForm.setItems(widget);
      
              testForm.draw();
      
              SC.showConsole();
          }
      }

      Comment


        #4
        Hi,
        is there any news on this ? Have you already tested this case ?

        Comment


          #5
          We've just made a change to address this issue.
          Please try the next nightly build (12.0 / 12.1d branch, dated May 10 or above)

          Regards
          Isomorphic Software

          Comment


            #6
            I've just tried newest version from night build Version SNAPSHOT_v12.1d_2018-05-13) and now i've got following warn message (Also still no event occurs):
            Code:
            *11:52:05.303:focusin8:WARN:Log:TypeError: Object doesn't support property or method 'logInfo'
            Stack from error.stack:
                EventHandler.determineEventKeyName () @ helloworld/sc/modules/ISC_Core.js:2218:1
                EventHandler.getKeyEventProperties () @ helloworld/sc/modules/ISC_Core.js:2215:1
                RichTextCanvas._iFrameKeyPress () @ helloworld/sc/modules/ISC_RichTextEditor.js:66:253
                Function code () @ Function code:1:69

            Comment


              #7
              Thanks for the notification. Yep - this was an error on our part. It's now fixed, so please pick up the next nightly build (May 16)
              Regards
              Isomorphic Software

              Comment


                #8
                Thanks for an answer. I've just tested it with latest nightly and it looks fine. So change event ist working despite that still getting some weird info about keymap.
                Code:
                *16:23:20.539:focusin8:INFO:Log:Trying to derive keyName from the charsetValueToKeyNameMap: 116 = 'T'
                *16:23:20.614:TMR4:WARN:Log:onChange event <p>test text text</p>
                At the same time we've experienced a few other bugs with control icons like bold,italic,underscore etc. related to Screen Reader mode. So every time we select part of an text and use one of those buttons selection goes off and cursor goes to the beggining of text and previously selected text stays unchanged. Only the newly entered text is changed to the new look. Also the new line makes a big gap between lines (looks like p element is inproperly styled).

                Only what i've got to this problems is warn like:
                Code:
                *16:27:06.460:focusin4:WARN:nativeFocus:isc_RichTextEditor_0_boldSelection:Button: Intercepting native focus from mouseDown on table cell and resetting to handle.

                Comment


                  #9
                  The problem in screen reader mode in IE with bolding (or underlining, etc.) a selection via the controls, and with inserting newlines has been fixed in SGWT 5.1p/SC 10.1p and newer releases. The fix for SGWT 6.0p/SC 11.0p and newer should be in today's builds, dated 2018-06-04.

                  Comment

                  Working...
                  X