Comments (7)
Hey @bnenu, thanks for submitting this issue.
Please ignore everything I wrote below. Found the issue, pushing a fix - both 1.7.x and 2.0.x.
Here's the bug:
To support the diversities picker long-click functionality, I used onMouseDown, and remove the click handler, meaning nothing prevents its default.
This seems to be related to: #38
In 1.6.1 I added the ability to get the event from the Emoji Click.
Can you try calling event.preventDefault()
in your onEMojiClick
callback event?
from emoji-picker-react.
There you go:
https://github.com/ealush/emoji-picker-react/releases/tag/1.7.2
feel free to update to 1.7.2
npm install --save 1.7.2
Let me know if that works for you.
from emoji-picker-react.
Published 2.0.2 as well.
from emoji-picker-react.
Hi, 2.0.2 is working now as expected. Many thanks for the quick reply.
I do have one question, is there a special reason you used an 'a' tag with a href attribute for the emoji, as far as I can tell you could have used any element with a 'onclick' handler?
from emoji-picker-react.
Hi, 2.0.2 is working now as expected. Many thanks for the quick reply.
Hey, no problem. I'm glad that it worked.
I do have one question, is there a special reason you used an 'a' tag with a href attribute for the emoji, as far as I can tell you could have used any element with a 'onclick' handler?
Yes. It is more correct, semantically speaking, to use a clickable elements for clickable parts of your app - even though it could work without it. My mistake was using an anchor tag (<a/>
) instead of the more semantically correct <button/>
element which is more suitable for non-navigable clickable elements - and wouldn't have caused that bug in the first place.
In the next major (3) I am planning to change the markup and replace all anchors with buttons.
from emoji-picker-react.
Hey, many thanks for the clarification. As a sidenote, I am not sure if it really breaks anything but in the docs you are mentioning 'emoji-js' for rendering emojis and as far as I could tell they changed their API with latest release(3.x) so the example given might not work. I used another package
- 'react-emojione'.
from emoji-picker-react.
Hm. I was not aware of this change. I'll look into their new API and if needed, modify the docs accordingly. Thanks!
from emoji-picker-react.
Related Issues (20)
- Enable/disable images as source for emojis HOT 2
- i wish there will be `how to run` section at readme file HOT 2
- onEmojiClick doesn't have access to the current state of the parent component HOT 8
- Missing & double emojis on Windows 11 HOT 3
- can't select "hand with fingers splayed" emoji in any skin colour other than Neutral HOT 5
- Can't load custom emojis from an API call. HOT 7
- 无法只需要部分表情 HOT 2
- how about upgrade project to use current node version? HOT 2
- `npm install` & `npm run storybook` instructions at contributing.md. should it be `yarn` & `yarn storybook`?
- Emojis aren't appearing on macOS Sonoma Chrome until hovering over them HOT 2
- emoji.length is 5 for some emojies and 2 for some HOT 1
- not working in electron windows. HOT 9
- Can I choose several emojis to form a group? And configure its navigation and header? HOT 5
- aria-label and title in Clear button HOT 1
- Accessible names of icons HOT 3
- Emoji Picker is downloading a ton of png emojis every render HOT 1
- emoji image loading failed
- emoji-picker-react is breaking build HOT 3
- emoji style doesnt work HOT 4
- Why did all emoji photo links fail to reference?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emoji-picker-react.