-
Notifications
You must be signed in to change notification settings - Fork 439
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
Insert emoji at caret location #365
Comments
You first initialize Tagify and then write a tag and only then, somehow, select an Emoji to be inside this tag, while still editing it? I don't understand the steps. At which step do you put an emoji, and how does it work exactly in terms of UI? what does the user do? |
It’s like Facebook a user can add anything . I was trying to add emoji after adding a tag . And no editing of tags was done here . |
The issue i am mentioning here was not there in the last version(2.31.3) and i am trying to get the current caret position using the function mentioned above and the value isn't right , so the emoji isn't inserting on the right position. |
I really don't understand what you are doing, if you could give me a link or make a simple demo page it would help. Also, you can switch to the old version for now, which you said works for you |
Its like after you have tagged someone and then you open an emoji picker and select an emoji to be inserted at the caret location (which is done through the function mentioned above) , so at this point the emoji isnt inserted at the right location. Tried creating a sample for you to check https://jsbin.com/tohenabelo/edit?html,js,output . Here click on the click button to see the value being inserted in the first tagged value. |
The moment you click on a button you loose focus to the input which means there is no caret anymore |
Yes , but the emoji should be inserted on the last caret position like in the previous version |
Is this what You want? |
The emoji isnt inserted while editing a tag, I am not editing the tags . |
I don't understand what you are trying to do, sorry.. can you describe the steps, in great details, that you want to happen? What does this mean:
what position? how to you define the position and where.. |
This demo shows what i am trying to do . After you click a button and insert emoji , the emoji inserted is not on the correct position . |
@yairEO What is the update on this ? this issue is yet not resolved for me . |
I will see again tomorrow. I am currently working on fixing urgent bugs which were quite nasty |
@muskangupta3 - not sure that it is exactly what you need, but I achieved something similar by directly modifying the current DOM
Then putting the focus back straight away : |
Prerequisites
Explanation
What is the expected behavior? I should be able to insert my emoji at the provided location
What is happening instead? I have a custom emoji picker in my code , which inserts the emoji at the cursor position . So when tagify is initialized , the emojis are not inserted on the correct position even after selecting a specific position for insertion . It is mostly inserted after whatever text i have written and if there is no text it starts inserting it inside the first tag value . This is happening in chrome , whereas in safari , there is already cursor issue after adding tag as mentioned in this issue(Mix Mode - Safari caret position after new tag #328 ) , but i am able to insert my emoji at the correct position .
I am using an array of emoji objects like these where i pick the emoji to insert into my input
This is the code i am using to insert emoji at a particular location in contenteditable elements.
I have attached the screenshot of the emoji being inserted inside the tag:
The text was updated successfully, but these errors were encountered: