8
0
فهرست منبع

Clarified the hack a bit.

Piotrek Koszuliński 9 سال پیش
والد
کامیت
71c51c02e3
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      packages/ckeditor5-engine/src/view/observer/selectionobserver.js

+ 2 - 0
packages/ckeditor5-engine/src/view/observer/selectionobserver.js

@@ -173,6 +173,8 @@ export default class SelectionObserver extends Observer {
 	 */
 	_isInfiniteLoop( newSelection ) {
 		// If the position is the same a the last one or the last but one we increment the counter.
+		// We need to check last two selections because the browser will first fire a selectionchange event
+		// for an incorrect selection and then for a corrected one.
 		if ( this._lastSelection && this._lastButOneSelection &&
 			( newSelection.isEqual( this._lastSelection ) || newSelection.isEqual( this._lastButOneSelection ) ) ) {
 			this._loopbackCounter++;