1

I can't seem to find how to open this default browser dialog programatically:

enter image description here

I tried window.find();, but that doesn't seem to work as I need to input text.

chazsolo
  • 7,873
  • 1
  • 20
  • 44
  • Pretty sure you can't. – zero298 Jun 29 '20 at 18:58
  • 2
    Does this answer your question? [Use Browser Search (Ctrl+F) through a button in website?](https://stackoverflow.com/questions/8080217/use-browser-search-ctrlf-through-a-button-in-website), or [Can I programmatically open the browser's native search dialogue by JavaScript?](https://stackoverflow.com/questions/52835530/can-i-programmatically-open-the-browsers-native-search-dialogue-by-javascript) – War10ck Jun 29 '20 at 19:00

1 Answers1

1

window.find is the closest one can get to this sort of behavior natively. Websites generally cannot control standard browser behavior, as it would pose a security risk. To emulate similar functionality and appearance, one can use CSS to style elements to look like the dialog and use JavaScript to implement the string finding.

Unmitigated
  • 76,500
  • 11
  • 62
  • 80