Skip to content

Commit

Permalink
Fix bug #46804
Browse files Browse the repository at this point in the history
  • Loading branch information
KhromovNikita committed Feb 5, 2025
1 parent f6c032c commit 7f14f3b
Show file tree
Hide file tree
Showing 2 changed files with 458 additions and 37 deletions.
6 changes: 5 additions & 1 deletion common/apiBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4859,17 +4859,21 @@
if (!this.internalEvents.hasOwnProperty(name))
this.internalEvents[name] = {};
this.internalEvents[name]["" + ((undefined === listenerId) ? 0 : listenerId)] = callback;

return true;
};
baseEditorsApi.prototype.detachEvent = function(name, listenerId)
{
if (!this.internalEvents.hasOwnProperty(name))
return;
return false;
var obj = this.internalEvents[name];
var prop = "" + ((undefined === listenerId) ? 0 : listenerId);
if (obj[prop])
delete obj[prop];
if (0 === Object.getOwnPropertyNames(obj).length)
delete this.internalEvents[name];

return true;
};
baseEditorsApi.prototype.sendInternalEvent = function()
{
Expand Down
Loading

0 comments on commit 7f14f3b

Please sign in to comment.