Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPrompt user for URL on Ctrl/Cmd-L #17047
Closed
Labels
Comments
|
Happy to work on that :) |
|
@jklepatch thanks. Let me know if you need help. |
|
Can this be closed now? |
|
Yep! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the user presses Ctrl-L (or Cmd-L on mac), the glutin port should show a prompt and ask for a new URL.
We should use tinyfiledialogs-rs. Here is an example of how to use a prompt: https://github.com/jdm/tinyfiledialogs-rs/blob/4bf666ab49bf9aafcbbc34b6d4383db00d737654/examples/main.rs#L10
The reload (Ctrl-R) keybinding can be used as an example:
servo/ports/glutin/window.rs
Line 1266 in 764da7b
We should add a rule for Ctrl-L, and if
shell.builtin-key-shortcuts.enabledis true, use tinyfiledialogs to ask for a new url (and make the default value of the dialog the current url).Once this is done, the url can be sanitize (can be done in a follow-up).
And then tell Servo to load this url with
WindowEvent::LoadUrl(input).