mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
Koenig - Fixed text deselection when toggling section formatting via toolbar
refs https://github.com/TryGhost/Ghost/issues/9623 - maintains easy reversibility by keeping text selected and toolbar shown in the same position to avoid jumping buttons when font size or other formatting changes
This commit is contained in:
parent
e9ead57da5
commit
d760e5633c
@ -26,6 +26,7 @@ export default Component.extend({
|
||||
classNames: ['absolute', 'z-999'],
|
||||
|
||||
// public attrs
|
||||
editor: null,
|
||||
editorRange: null,
|
||||
activeMarkupTagNames: null,
|
||||
activeSectionTagNames: null,
|
||||
@ -120,7 +121,11 @@ export default Component.extend({
|
||||
},
|
||||
|
||||
toggleSection(sectionName) {
|
||||
let range = this.editorRange;
|
||||
this.toggleSection(sectionName);
|
||||
this.editor.run((postEditor) => {
|
||||
postEditor.setRange(range);
|
||||
});
|
||||
},
|
||||
|
||||
editLink() {
|
||||
|
Loading…
Reference in New Issue
Block a user