Forum Moderators: not2easy

Message Too Old, No Replies

You know how when you highlight text and that menu pops up.

         

csdude55

4:36 am on Jul 7, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



... you know the one that says "Copy", "Paste", "Select All", etc?

Now this question might be out there, but do you guys have any idea how to prevent that menu from popping up?

Or better yet, how to change its location?

I've worked really hard to make this contenteditable section work on mobile, and I have a menu above the section where the user can change the formatting. But on both Android and iPhone, their Copy / Paste menu covers up MY menu!

I can drag their menu away on Android, but I'm not sure about iPhone. And I'm not sure how many "normal" people are going to think to do that. But that menu kinda defeats the whole purpose of me making it contenteditable!

I know the next question is, why don't I move MY menu? The answer is... I don't know where I could move it to. I have emojis below the element, so I'm not sure where else I could put the menu that would make sense to the user. I might could play with a pop-out for emojis or something, but that would be super confusing so I would be a lot happier if I could just do something about their menu instead.

robzilla

9:21 am on Jul 7, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Maybe -webkit-touch-callout [developer.mozilla.org] and/or user-select [developer.mozilla.org]?

csdude55

7:30 pm on Jul 7, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I could be wrong on this one, Rob, but it looks like -webkit-touch-callout just works on Safari on iOS, right?

I tried user-select before, but it keeps the user from being able to highlight the text at all. But in my case, I need for them to highlight it so that my menu will work... I just need their menu to go away first!

I can't find any way to do it, though, so unless you guys have a clever solution then I might have to show a text block that explains to mobile users how to move their own menu :'-(

robzilla

7:28 pm on Jul 8, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hmmm, thought I'd read it worked on Android, too, but can't find it anymore.

Hope all the hassle with contenteditable is worth it ;-)

csdude55

2:39 am on Jul 10, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hope all the hassle with contenteditable is worth it ;-)

Preach it, brother! lol So far it's taken over a month, and I still don't have it working right :'-( But I'm getting close, so I've gone too far to turn back now!