Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit fd7734e

Browse files
authored
Merge pull request #1598 from ckeditor/t/1597
Fix: Renamed the event during selection attributes conversion. `attribute:key` becomes to `attribute:key:$text`. Closes #1597.
2 parents c33c49c + 8e34405 commit fd7734e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/conversion/downcastdispatcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export default class DowncastDispatcher {
294294

295295
// Do not fire event if the attribute has been consumed.
296296
if ( this.conversionApi.consumable.test( selection, 'attribute:' + data.attributeKey ) ) {
297-
this.fire( 'attribute:' + data.attributeKey, data, this.conversionApi );
297+
this.fire( 'attribute:' + data.attributeKey + ':$text', data, this.conversionApi );
298298
}
299299
}
300300

tests/conversion/downcastdispatcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe( 'DowncastDispatcher', () => {
319319

320320
dispatcher.convertSelection( doc.selection, model.markers, [] );
321321

322-
expect( dispatcher.fire.calledWith( 'attribute:bold' ) ).to.be.true;
322+
expect( dispatcher.fire.calledWith( 'attribute:bold:$text' ) ).to.be.true;
323323
} );
324324

325325
it( 'should not fire attributes events if attribute has been consumed', () => {

0 commit comments

Comments
 (0)