林的特性「clientX」。 我剛剛更新了我的mootools到1.4.5版本,當我點擊編輯/拖我得到JS例外:王牌編輯 - 遺漏的類型錯誤:使用ACE編輯器和mootools的無法讀取未定義
Uncaught TypeError: Cannot read property 'clientX' of undefined
請幫助...謝謝
林的特性「clientX」。 我剛剛更新了我的mootools到1.4.5版本,當我點擊編輯/拖我得到JS例外:王牌編輯 - 遺漏的類型錯誤:使用ACE編輯器和mootools的無法讀取未定義
Uncaught TypeError: Cannot read property 'clientX' of undefined
請幫助...謝謝
這是一個很奇怪的錯誤。在調試過程中,我沒有收到錯誤。但是一旦我刪除了斷點,它就會再次出現。我終於通過adding the latest version of mootools 1.4.5解決了joomla問題。錯誤立即消失了。
我解決這個問題我的情況! 我已經刪除mootools.js一些線路:
1)結合:功能(E){風險一個=此,B =的arguments.length> 1 Array.slice(參數1):空,d = function(){}; var c = function(){var g = e,h = arguments.length; if(this instanceof c){d.prototype = a.prototype; (g): g = new d;} var f =(!b & &!h)?a.call(g):a.apply(g,b & & h?b.concat(Array.slice(arguments)):b ||參數);返回克==電子網:克;};返回℃;}
2)刪除Function.prototype.bind;
(我不需要鼠標mootools的約束力所以它啓示了我!)
,而無需刪除綁定方法總是我想我找到了一個解決方法。似乎只有幾個Mootools構建有這個問題。所以我用這個代碼來解決這些問題:
if (this.MooTools.build=='ab8ea8824dc3b24b6666867a2c4ed58ebb762cf0') {
delete Function.prototype.bind;
Function.implement({
/*<!ES5-bind>*/
bind: function(that){
var self = this,
args = arguments.length > 1 ? Array.slice(arguments, 1) : null,
F = function(){};
var bound = function(){
var context = that, length = arguments.length;
if (this instanceof bound){
F.prototype = self.prototype;
context = new F;
}
var result = (!args && !length)
? self.call(context)
: self.apply(context, args && length ? args.concat(Array.slice(arguments)) : args || arguments);
return context == that ? result : context;
};
return bound;
},
/*</!ES5-bind>*/
});
}
的好處是,我可以修復它爲每個單獨建立。缺點是顯然有我自己的代碼附帶的mootools代碼。但目前我看不到其他選擇,因爲我爲Joomla編碼,所以我確信使用的mootools版本數量有限。
沒有當您重新添加斷點的錯誤返回? –
是的,它再次出現。 –