[CLOSED] HtmlEditor currentRange in IE11

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    There is also one alternative approach more.
    Ext.ComponentQuery.query("htmleditor").length > 0
  2. #12
    There is also one alternative approach more.

    Ext.ComponentQuery.query("htmleditor").length > 0
    The approach presented above works as expected but it has a performance problem, since it will navigate through all items, as shown below:

    Ext.ComponentQuery.query uses Ext.ComponentQuery.filterByXType
    filterByXType = function (items, xtype, shallow) {
        if (xtype === '*') {
            return items.slice();
        }
        else {
            var result = [],
                i = 0,
                length = items.length,
                candidate;
            for (; i < length; i++) {
                candidate = items[i];
                if (candidate.isXType(xtype, shallow)) {
                    result.push(candidate);
                }
            }
            return result;
        }
    }
    Items passed to Ext.ComponentQuery.filterByXType:
    Ext.ComponentManager.getAll()
    CPA1158139's requirement is to know whether a HtmlEditor is presented on the page, so, in my opinion it's not good to navigate through all elements, although we are talking about milliseconds.
    Last edited by RaphaelSaldanha; Jan 07, 2015 at 1:42 PM.
  3. #13
    You two really is too brilliant, admire. Learning.....
  4. #14
    Raphael, I agree with you on both the statements.

    There might be another approach also. When you add an HtmlEditor on the page, you can set some global flag.

    By the way, could you, please, clarify why you need to determine there is an HtmlEditor on the page or not? Just our of curiosity.
  5. #15
    The thing is that:
    After RaphaelSaldanha tell me the code,I put this code into a JS file, start running good, later reported the error: Ext is not defined, but I do have a reference to the Ext.Net. so I think if to determine what, if the page is not htmlEditor, do not need to load the code. In fact this does not work either, because Ext is not defined the problem still exists, the judgment function also need Ext. and then I had to take him the code manually modify the download of the SVN code, and then get the Ext.Net.dll do not appear the mistake in the original.

    So, I also feel strange, why don't you just give RaphaelSaldanha'code directly modifications to the SVN, so we in the IE 11 when running htmlEditor on all OK.
  6. #16
    There might be another approach also. When you add an HtmlEditor on the page, you can set some global flag.
    Daniil, take a look on example #2: http://forums.ext.net/showthread.php...l=1#post227981
  7. #17
    When I update to the latest svn version #6243, this problem does not change.

    Can replace B by A in SVN?

    B:
    onEditorEvent: function () {
            if (Ext.isIE && !Ext.isIE11) {
                this.currentRange = this.getDoc().selection.createRange();
            }
            this.updateToolbar();
        }

    A:
      onEditorEvent: function () {
            if (Ext.isIE && !Ext.isIE11) {
                var doc = this.getDoc();
                if (doc.selection != null) {
                    this.currentRange = doc.selection.createRange();
                }
            }
            this.updateToolbar();
        }
  8. #18
    They found a two frequent problems in the IE 11, NULL type error. The cursor will stay in the following location For reference only:

    1、
           fireEvent: function(eventName) {
            var args = Array.prototype.slice.call(arguments, 1); //here!
    
            return this.doFireEvent(eventName, args);
        },
    2、
    
       getDoc: function () {
            try {
                return this.getWin().document; //here!
            } catch (ex) {
                return null;
            }
        },
    
        getWin: function () {
            var me = this,
                name = me.id + "_IFrame",
                win = Ext.isIE
                    ? me.iframe.dom.contentWindow
                    : window.frames[name];
            return win;
        },
    Last edited by CPA1158139; Jan 08, 2015 at 2:05 PM.
  9. #19
    Daniil, take a look on example #2: http://forums.ext.net/showthread.php...l=1#post227981
    Raphael, I meant without overriding the Ext.ComponentManager's registerId. Just when an HtmlEditor is added to the page. Well, never mind at this moment.

    @CPA1158139, the problem should be resolved with ExtJS 5.1.0, when I commit it to the SVN. Once I commit, I will let you know and we all could retest and confirm it is still reproducible or not. Apologize for the inconvenience.
  10. #20
    Never mind.Daniil.Thank you for working so hard.

    I have a little not too clear,about ExtJS 5.1.0, is the direct integration of ext.net packaging, and I also installed separately? Or just get SVN updates only?
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [CLOSED] IE11 tooltips
    By bogc in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 22, 2014, 1:14 PM
  2. [CLOSED] Scroll cannot drag down in IE11
    By CPA1158139 in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 19, 2014, 2:28 AM
  3. [CLOSED] [#477] HtmlEditor icw IE11
    By prost in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: May 05, 2014, 5:27 AM
  4. [CLOSED] IE11 support with Ext JS 3.4.2
    By anup in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jan 30, 2014, 3:02 PM
  5. [CLOSED] IE11 and Chrome
    By ATLAS in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 13, 2013, 12:25 PM

Posting Permissions