Comments (16)
OK, I found mobile safari don't support the API used for text selection. I tried using a textarea (so that we can select text) but then there is this weird ,
comes before newline. I'll have to play around bit more.
from emoji-gram.
I found that if you:
- press and hold the button until the button text is selected
- then tap an area of the button that is not selected
- somehow output text is then selected
from emoji-gram.
It works on Android Chrome. But why do you have the button say press n hold? Tapping the button selects all text and places on clipboard(in chrome). Earlier labels were more meaningful. Perhaps for safari it should not say 'Copied'
from emoji-gram.
Ah, I have it say that because on iPhone Safari and iPhone chrome the button won't actually do anything when you tap. I found that if you press and hold (above comment), it'll allow you to select all of it.
Do you have access to an iOS device to test on?
from emoji-gram.
Nope. On Android if you press and hold the button, it will select button text. Does not tapping on the select button select the emoji code? It should. Selection is supported in safari. Ideally it should say Select
and on device that supports clipboard it should copy and button changed to Copied
. Otherwise, it should not say Copied
.
from emoji-gram.
No when you tap the button, nothing happens. That's why I changed the button text.
The press and hold has the same effect on mobile safari, but once you tap to deselect the button text, it somehow magically selects the emoji text. So it's a "hack" until we can resolve why a single tap on the button isn't selecting the text.
I'll do a screen record so you can see.
from emoji-gram.
Check it out https://www.dropbox.com/s/2bdvnpynd56nzrm/issue2.mov?dl=0
You can see, I tap the button (it changes text every tap) multiple times before I press and hold it. Once I press and hold, it behaves just like you android, but then one more tap, and somehow all the text is selected.
Is there anything I can do to help troubleshoot?
from emoji-gram.
Tap to select needs to be fixed.
from emoji-gram.
I just packaged the latest: http://lobdell.me/emoji-gram/
iPhone still doesn't want to select the text 🤔 However it looks like the Safari / iMessage react issue is totally resolved!! That's awsome!!
I ran: "npm run build" then copied the files to my server after linking the css file. Is it possible something is getting messed up in the packaging process?
from emoji-gram.
Would this be a simple way to fix this?
http://stackoverflow.com/questions/1899421/selecting-text-in-mobile-safari-on-iphone
Not just the first answer, but a couple people down the thread seem to have fixes working for them. Just poking around.
from emoji-gram.
Need an iphone to test :(
from emoji-gram.
Dang. I tried to plugin my iPhone and use the developer console for a debug, but no errors / warnings appeared. So, no help 👎
Anyhow, I took to the internet again: http://stackoverflow.com/questions/38233871/auto-select-text-range-in-mobile-safari-ios-9-reactjs -- maybe someone can help us!
from emoji-gram.
Hmm, only workaround is using a textarea but I'm not sure where that ,
comes from after every new line. I'll have to take another look.
from emoji-gram.
It looks like the latest bugfix only brings up the keyboard when you press the button. It's acting like the text area is being focused instead of selecting everything.
www.lobdell.me/emoji-gram -- is the latest master + bugfix.
from emoji-gram.
I recorded the new behavior (each time the keyboard moves up, it's a tap on the button) here:
from emoji-gram.
Resolved with:
this.selectionStart=0; this.selectionEnd=this.ele.length;
from emoji-gram.
Related Issues (16)
- Select Button Won't Display HOT 3
- Scroll Zones too small HOT 1
- Remove: Clear Text Field Hint HOT 3
- Update Core to latest "emojiart" HOT 4
- Set Max Width for Desktop HOT 4
- Scrollers Inaccurately Displaying Emoji Selection
- Set Default emoji to ❄️ / ❤️ HOT 1
- Resolve Copy Paste Issue HOT 18
- Allow Numbers & Special Characters HOT 2
- Feature Request: Phrase Recognition
- iOS keyboard displays when emoji textarea is focused
- Backgrounding web app clears state
- Android specific emoji list
- Feature Request: Swap Emoji Button
- Feature Request: Font Switcher
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-gram.