Skip to content

Commit

Permalink
Fix link menu positioning
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Sep 29, 2020
1 parent 8972a3a commit 9f10cce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/components/MenuBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
class="menububble__button"
:class="{ 'is-active': isActive.link() }"
@click="showLinkMenu(getMarkAttrs('link'))">
<span v-tooltip="isActive.link() ? 'Update Link' : 'Add Link'" class="icon-link" />
<span class="menububble__buttontext">{{ t('text', 'Add link') }}</span>
<span class="icon-link" />
<span class="menububble__buttontext">{{ isActive.link() ? t('text', 'Update link') : t('text', 'Add link') }}</span>
</button>
</template>
</div>
Expand Down Expand Up @@ -107,11 +107,15 @@ export default {
box-shadow: 0 1px 5px var(--color-box-shadow);
border-radius: var(--border-radius);
padding: 0;
margin-bottom: 0.4rem;
margin-bottom: 0;
margin-left: 10px;
visibility: hidden;
opacity: 0;
transform: translateX(-50%);
transition: opacity 0.2s, visibility 0.2s;
// We need a fixed width here since tiptap doesn't recalculate the left position on resize
width: 180px;
height: 40px;

&.is-active {
opacity: 1;
Expand All @@ -120,8 +124,9 @@ export default {

&__button {
display: block;
flex-grow: 1;
border: 0;
padding: 0.3rem 0.7rem;
padding: 0.9rem 0.7rem;
margin: 0;
margin-right: 0.2rem;
border-radius: var(--border-radius);
Expand Down
3 changes: 2 additions & 1 deletion src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default {

<style lang="scss" scoped>
#rich-workspace {
padding: 0 60px;
padding: 0 50px;
/* Slightly reduce vertical space */
margin-bottom: -24px;
text-align: left;
Expand Down Expand Up @@ -210,6 +210,7 @@ export default {
#rich-workspace::v-deep #editor {
overflow: scroll !important;
max-height: 50vh;
padding-left: 10px;
}

#rich-workspace::v-deep #editor-wrapper .ProseMirror {
Expand Down

0 comments on commit 9f10cce

Please sign in to comment.