diff --git a/CHANGELOG.md b/CHANGELOG.md index fb7c3fd87322..fad5f10956e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -249,6 +249,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Console] Fix dev tool console autocomplete not loading issue ([#3775](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3775)) - [Console] Fix dev tool console run command with query parameter error ([#3813](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3813)) - Add clarifying tooltips to header navigation ([#3573](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3573)) +- [Console] Fix dev tool console not updating action bar ([#3920](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3920)) ### 🚞 Infrastructure diff --git a/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts b/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts index 5fe93ca4e094..d70d3de39a5b 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts +++ b/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts @@ -277,11 +277,11 @@ export class LegacyCoreEditor implements CoreEditor { } else { if (topOrBottom === 'top') { this.actions.style.bottom = 'auto'; - this.actions.style.top = value; + this.actions.style.top = `${value}px`; this.actions.style.visibility = 'visible'; } else { this.actions.style.top = 'auto'; - this.actions.style.bottom = value; + this.actions.style.bottom = `${value}px`; this.actions.style.visibility = 'visible'; } } @@ -320,7 +320,7 @@ export class LegacyCoreEditor implements CoreEditor { // elements are positioned relative to the editor's container // pageY is relative to page, so subtract the offset // from pageY to get the new top value - const offsetFromPage = this.editor.container.offsetTop; + const { top: offsetFromPage } = this.editor.container.getBoundingClientRect(); const startLine = range.start.lineNumber; const startColumn = range.start.column; const firstLine = this.getLineValue(startLine);