1. #91
    Sencha User
    Join Date
    May 2009
    Posts
    9
    Vote Rating
    0
    JuneEk is on a distinguished road

      0  

    Default Does not make the active window when you click on the editor

    Does not make the active window when you click on the editor


    Does not make the active window when you click on the editor. If you click on another input field - the window becomes active.

    Verified by the example of desktop application.

  2. #92
    Sencha User
    Join Date
    Jun 2008
    Posts
    297
    Vote Rating
    17
    Qtx will become famous soon enough

      0  

    Default


    Hi,

    thank you for the hint. I will check this.

    For clarification.

    How can I reproduce and test this? I should open a couple of non-modal windows with wysiwig field, and go into the editor.

    How can I check whether a window is active? Is there special method?

  3. #93
    Sencha User
    Join Date
    May 2009
    Posts
    9
    Vote Rating
    0
    JuneEk is on a distinguished road

      0  

    Default


    I looked at the windows overlap each other.

  4. #94
    Sencha User
    Join Date
    Jun 2008
    Posts
    297
    Vote Rating
    17
    Qtx will become famous soon enough

      0  

    Default


    Adjust the code as follows.

    Old code:
    Code:
          ed.onInit.add(function(ed) {
            me.wysiwygIntialized = true;
            me.intializationInProgress = false;
            
            if(me.isDisabled()) me.disableEditor();
          });
    New code:
    Code:
          ed.onInit.add(function(ed) {
            me.wysiwygIntialized = true;
            me.intializationInProgress = false;
            
            if(me.isDisabled()) me.disableEditor();
            
            tinymce.dom.Event.add(ed.getWin(), 'focus', function(e) {
              var w = me.findParentByType('window');
              if(w) w.toFront();
            });
          });
    I will put it into the next release.

  5. #95
    Sencha User
    Join Date
    May 2009
    Posts
    9
    Vote Rating
    0
    JuneEk is on a distinguished road

      0  

    Default


    This code is not working properly. The first time you click, activate the desired window. On subsequent clicks on the editors in other windows is activated only the first window.

  6. #96
    Sencha User
    Join Date
    Jun 2008
    Posts
    297
    Vote Rating
    17
    Qtx will become famous soon enough

      0  

    Default


    I have investigated this. This problem occurs when you use the same configuration object for many wysiwygs. If each wysiwyg has own config object, it works properly.

    I could not understand so far in a short time, why this effect take place. It is very strange.

    I will try to find out the reason.

  7. #97
    Sencha User
    Join Date
    Jun 2008
    Posts
    297
    Vote Rating
    17
    Qtx will become famous soon enough

      0  

    Default


    Well, I have found out it!

    Old code, method initEditor

    Code:
        if(!me.tinyMCEConfig) me.tinyMCEConfig = {};
    New code

    Code:
        if(!me.tinyMCEConfig) 
        {
          me.tinyMCEConfig = {};
        }
        else
        {
          // We need clone, not reference.
          // The configuration of the wysiwyg might be passed as an object to
          // many editor instances. Through cloning, we prevent 
          // side effects on other editors upon internal modifications
          // of the tinyMCEConfig
          var tmp_cfg = me.tinyMCEConfig;
          me.tinyMCEConfig = {};
          Ext.Object.merge(me.tinyMCEConfig, tmp_cfg);
        }

  8. #98
    Sencha User
    Join Date
    May 2009
    Posts
    9
    Vote Rating
    0
    JuneEk is on a distinguished road

      0  

    Default


    Excellent. The windows actually switched. But the focus remains on the window, not the editor. One has to click on the editor to start editing.

    If you do like the usual input fields, the caret appears immediately.

  9. #99
    Sencha User
    Join Date
    Jun 2008
    Posts
    297
    Vote Rating
    17
    Qtx will become famous soon enough

      1  

    Default


    Hi.

    When does this problem occurs?

    When I click into the editable area, the window goes into the frond and the editable area remains focused.

    Maybe, you mean, when you click somewhere else e.g. on the tool bar area of the editor, the window goes into the frond but the editable area does not receive the focus. Do you mean this case?

  10. #100
    Sencha User
    Join Date
    May 2009
    Posts
    9
    Vote Rating
    0
    JuneEk is on a distinguished road

      0  

    Default


    I mean, the editor does not show the caret when clicking on the editor text.

    Thus, the focus gets a window, not the editor. Although, when you click on the toolbar, everything works correctly.