Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caret is out of position #143

Open
dvdhoek opened this issue Jul 14, 2022 · 3 comments
Open

Caret is out of position #143

dvdhoek opened this issue Jul 14, 2022 · 3 comments
Labels

Comments

@dvdhoek
Copy link

dvdhoek commented Jul 14, 2022

When using custom slots the caret moves to the wrong place.
image

When I continue typing it goes back to the correct place, right after where I pressed enter. Is this a known issue and is there a fix for it? The code that I'm using:

<section>
    <at :members="organisationDetails.users" name-key="firstName">
        <template slot="item" slot-scope="s">
             <img :src="s.item.avatar" />
             <span class="tag" v-text="s.item.firstName"></span>
        </template>
        <template slot="embeddedItem" slot-scope="s">
            <span><span class="tag" v-text="s.current.firstName"></span></span>
        </template>
        <div class="editor" contenteditable v-html="html"></div>
      </at>
</section>
@yurii-mamchur
Copy link

yurii-mamchur commented Jul 20, 2022

I have same issue! @dvdhoek @fritx any updates on this?

@fritx
Copy link
Owner

fritx commented Jul 20, 2022

Could you provide a minimal repo or more code? @dvdhoek @yurii-mamchur

Is it related to some specific browsers?

@yurii-mamchur
Copy link

@fritx it doesn't work in Chrome only. Reprodusable in any case then you use embeddedItem slot

 <template slot="embeddedItem" slot-scope="s">
      <span><span class="tag" v-text="s.current.firstName"></span></span>
  </template>

same issue here

it happends because embeddedItem has contenteditable='false' if its true everything works as expected.

To fix it you probably should add <br /> to the end of <div contenteditable>

@fritx fritx added the bug label Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants