Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
Opening contextual menu in iOS Safari WITHOUT long pressing?

I'm trying to see if there is a way to invoke the native contextual menu for a link in iOS Safari without requiring the user to do a long press.

(For example, if you open nytimes.com on your iPhone, and then long press on the first headline to open the system contextual menu, it will contain: Open Link, Open in New Tab, Copy Link, etc)

So we want to invoke THAT on our site WITHOUT requiring the user to press for 500ms. Ideally, the user can simply tap a button, but any alternative to long pressing would be acceptable (double tap, swipe, two-finger tap, etc.).

This effect is definitely possible inside of a native app with swift/obj-c. That is not what I'm looking for. I'm trying to achieve this specifically on our website when opened in Safari on iOS.

I've already tried:

1— seeing if there is a way to reduce the long-press time requirement. While it's possible to disable entirely with -webkit-touch-callout, we've found no way to reduce the time. Solutions on the internet that refer to variable long-press time delay thresholds all utilize third-party libraries to create non-native long-press behaviors, like pressing a button to make it 'jiggle'.

2— seeing if there is a way to ignore touchend event — so in other words, the user would tap (~10ms) and this would start a timer, and 490ms later the callout menu appears, long after the user has removed her finger. No luck with this either but seems like the most promising approach.

3— we also tried other, less ideal solutions where, for example, the user double taps — first on a transparent element, then on the main button. No luck with that either.

Any suggestions (or complete solutions!) would be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

As i understand it, you open your application with webframe and you want to change a property that IOS has. I think you cant change this property with javascript or css. you should make a method that does this job with swift/obj-c, then you should consider triggering it via javascript.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda