8
0
فهرست منبع

Fixed: EmitterMixin was skipping part of event namespace when looking for callbacks.

Szymon Cofalik 9 سال پیش
والد
کامیت
d423770bc4
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/ckeditor5-utils/src/emittermixin.js

+ 1 - 1
packages/ckeditor5-utils/src/emittermixin.js

@@ -407,7 +407,7 @@ function getCallbacksForEvent( source, eventName ) {
 		// But this could be a specific-type event that is in a namespace.
 		if ( eventName.indexOf( ':' ) > -1 ) {
 			// If the eventName is specific, try to find callback lists for more generic event.
-			return getCallbacksForEvent( source, eventName.substr( 0, eventName.indexOf( ':' ) ) );
+			return getCallbacksForEvent( source, eventName.substr( 0, eventName.lastIndexOf( ':' ) ) );
 		} else {
 			// If this is a top-level generic event, return null;
 			return null;