Skip to content

Commit

Permalink
Merge pull request #14207 from ckeditor/ci/3289-powered-by-moves-slig…
Browse files Browse the repository at this point in the history
…htly-when-the-editor-is-focused-for-the-first-time

Fix (ui): The "Powered by" logo should not shake on the first show. Closes cksource/ckeditor5-internal#3289.
  • Loading branch information
oleq committed May 23, 2023
2 parents 83e3724 + df765c4 commit 48fa344
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/ckeditor5-ui/src/editorui/poweredby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default class PoweredBy extends DomEmitterMixin() {
* Creates an instance of the {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView balloon panel}
* with the "powered by" view inside ready for positioning.
*/
private _createBalloonView() {
private _createBalloonView(): void {
const editor = this.editor;
const balloon = this._balloonView = new BalloonPanelView();
const poweredByConfig = getNormalizedConfig( editor );
Expand All @@ -166,7 +166,7 @@ export default class PoweredBy extends DomEmitterMixin() {
/**
* Attempts to display the balloon with the "powered by" view.
*/
private _showBalloon() {
private _showBalloon(): void {
if ( !this._lastFocusedEditableElement ) {
return;
}
Expand All @@ -185,7 +185,7 @@ export default class PoweredBy extends DomEmitterMixin() {
/**
* Hides the "powered by" balloon if already visible.
*/
private _hideBalloon() {
private _hideBalloon(): void {
if ( this._balloonView ) {
this._balloonView!.unpin();
}
Expand Down
5 changes: 4 additions & 1 deletion packages/ckeditor5-ui/theme/globals/_poweredby.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
.ck.ck-balloon-panel.ck-powered-by-balloon {
--ck-border-radius: var(--ck-powered-by-border-radius);

border: 0;
box-shadow: none;
background: var(--ck-powered-by-background);
min-height: unset;
Expand Down Expand Up @@ -60,6 +59,10 @@
}
}

&[class*="position_inside"] {
border-color: transparent;
}

&[class*="position_border"] {
border: var(--ck-focus-ring);
border-color: var(--ck-powered-by-border-color);
Expand Down

0 comments on commit 48fa344

Please sign in to comment.