Skip to content

Commit

Permalink
IBX-5741: Fixed attribute preview cannot be collapsed (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Jun 23, 2023
1 parent 43cf506 commit cd54c30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ class IbexaCustomTagUI extends Plugin {
this.attributesView.setChildren({
attributes: this.config.attributes,
});

clickOutsideHandler({
emitter: this.attributesView,
activator: () => this.balloon.hasView(this.attributesView),
contextElements: [this.balloon.view.element],
callback: () => this.hideAttributes(),
});
}

createFormView() {
Expand Down Expand Up @@ -132,7 +139,7 @@ class IbexaCustomTagUI extends Plugin {

this.balloon.add({
view: this.attributesView,
position: this.getBalloonPositionData(),
position: { target },
});

this.balloon.updatePosition({ target });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import View from '@ckeditor/ckeditor5-ui/src/view';
import IbexaButtonView from '../../common/button-view/button-view';

class IbexaCustomTagFormView extends View {
class IbexaCustomTagAttributesView extends View {
constructor(props) {
super(props);

Expand Down Expand Up @@ -89,4 +89,4 @@ class IbexaCustomTagFormView extends View {
}
}

export default IbexaCustomTagFormView;
export default IbexaCustomTagAttributesView;

0 comments on commit cd54c30

Please sign in to comment.