Jun 12, 2017, 5:39 AM
[FIXED] [#1496] [4.2.2] JS error on tooltips when drag/drop is used and commit from MVC
I cant get seem to reproduce in a testcase but that is because you need a full working MVC backend. the "commit" that occurs in the save causes a problem when tooltips are use (template) AND drag/drop is in play AND MVC commit is done.
I know you like reproducible cases but i cant seem to write it (without an MVC backend i can upload). I can reproduce it 100% of the time. I attached the screenshot of where it crashes. you can see that the Ext.fly is null and this causes the exception.
I attached some more code so you can see where the error is in more detail.
/Z
I know you like reproducible cases but i cant seem to write it (without an MVC backend i can upload). I can reproduce it 100% of the time. I attached the screenshot of where it crashes. you can see that the Ext.fly is null and this causes the exception.
I attached some more code so you can see where the error is in more detail.
/Z
Ext.define('Ext.tip.QuickTip', {
extend: 'Ext.tip.ToolTip',
alias: 'widget.quicktip',
alternateClassName: 'Ext.QuickTip',
interceptTitles: false,
title: '*',
tagConfig: {
namespace: 'data-',
attribute: 'qtip',
width: 'qwidth',
target: 'target',
title: 'qtitle',
hide: 'hide',
cls: 'qclass',
align: 'qalign',
anchor: 'anchor',
showDelay: 'qshowDelay',
hideAction: 'hideAction',
anchorTarget: 'anchorTarget'
},
isQuickTip: true,
shrinkWrapDock: true,
initComponent: function() {
var me = this,
cfg = me.tagConfig,
attr = cfg.attr || (cfg.attr = cfg.namespace + cfg.attribute);
me.delegate = Ext.Function.bind(me.delegate, me);
me.target = me.target || Ext.getDoc();
me.targets = me.targets || {};
me.callParent();
},
setTagConfig: function(cfg) {
this.tagConfig = Ext.apply({}, cfg);
delete this.tagConfig.attr;
},
text: null,
register: function(config) {
var configs = Ext.isArray(config) ? config : arguments,
i = 0,
len = configs.length,
target, j, targetLen;
for (; i < len; i++) {
config = configs[i];
target = config.target;
if (target) {
if (Ext.isArray(target)) {
for (j = 0 , targetLen = target.length; j < targetLen; j++) {
this.targets[Ext.id(target[j])] = config;
}
} else {
this.targets[Ext.id(target)] = config;
}
}
}
},
unregister: function(el) {
delete this.targets[Ext.id(el)];
},
cancelShow: function(el) {
var me = this,
currentTarget = me.currentTarget;
el = Ext.getDom(el);
if (me.isVisible()) {
if (currentTarget.dom === el) {
me.hide();
}
} else if (currentTarget.dom === el) {
me.clearTimer('show');
}
},
delegate: function(target) {
var me = this,
cfg = me.tagConfig,
attr = cfg.attr || (cfg.attr = cfg.namespace + cfg.attribute),
text;
text = target.getAttribute(attr) || (me.interceptTitles && target.title);
return !!text;
},
getTipText: function(target) {
var titleText = target.title,
cfg = this.tagConfig,
attr = cfg.attr || (cfg.attr = cfg.namespace + cfg.attribute),
text;
if (this.interceptTitles && titleText) {
target.setAttribute(attr, titleText);
target.removeAttribute('title');
return titleText;
} else {
return target.getAttribute(attr);
}
},
onTargetOver: function(event) {
var me = this,
currentTarget = me.currentTarget,
target = event.target,
targets, registeredTarget, key;
if (!target || target.nodeType !== 1 || target === document.documentElement || target === document.body) {
return;
}
me.pointerEvent = event;
targets = me.targets;
for (key in targets) {
if (targets.hasOwnProperty(key)) {
registeredTarget = targets[key];
if (registeredTarget.target && Ext.fly(registeredTarget.target).contains(target) && !Ext.fly(registeredTarget.target).contains(event.relatedTarget)) {
target = Ext.getDom(registeredTarget.target);
currentTarget.attach(target);
me.activeTarget = registeredTarget;
registeredTarget.el = currentTarget;
me.anchor = registeredTarget.anchor;
me.activateTarget();
return;
}
}
}
me.callParent([
event
]);
},