Skip to content

Commit

Permalink
Changed "unload" to "beforeunload" in extjs to avoid deprecation warn…
Browse files Browse the repository at this point in the history
…ing in developer console (#3853)
  • Loading branch information
andrewcbi authored Feb 25, 2024
1 parent ef34421 commit 9f85ccd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions js/extjs/ext-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2171,7 +2171,7 @@ Ext.EventManager = function(){
E.on(el, ename, h);
if(ename == "mousewheel" && el.addEventListener){ // workaround for jQuery
el.addEventListener("DOMMouseScroll", h, false);
E.on(window, 'unload', function(){
E.on(window, 'beforeunload', function(){
el.removeEventListener("DOMMouseScroll", h, false);
});
}
Expand Down Expand Up @@ -5721,7 +5721,7 @@ if(Ext.isIE || Ext.isGecko){
}


Ext.EventManager.on(window, 'unload', function(){
Ext.EventManager.on(window, 'beforeunload', function(){
delete El.cache;
delete El._flyweights;
});
Expand Down Expand Up @@ -9188,7 +9188,7 @@ Ext.dd.DragDropMgr = function() {

Event.on(document, "mouseup", this.handleMouseUp, this, true);
Event.on(document, "mousemove", this.handleMouseMove, this, true);
Event.on(window, "unload", this._onUnload, this, true);
Event.on(window, "beforeunload", this._onUnload, this, true);
Event.on(window, "resize", this._onResize, this, true);
// Event.on(window, "mouseout", this._test);

Expand Down
Loading

0 comments on commit 9f85ccd

Please sign in to comment.