-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In dialogs F1 is the shortcut key for activating the control with the dlg-callback-help class, e.g. a link to a help article. While this works in itself SketchUp also opens the SketchUp help center in a web browser.
Opening 2 help resources may be confusing and prevent the user from finding the relevant help resource. The desired result would be for F1 to not open SketchUp help inside a dialog that has a help control, but only activate the help control of that dialog.
Steps to reproduce:
- Run code below.
- Press F1
base_dir = UI.select_directory(title: "Locate modules/")
html = <<-HTML
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<base href="#{base_dir}/" />
<script src="controls.js"></script>
<script src="jquery-1.12.4.js"></script>
<script>
// Initialize the controls when the document is ready.
$(document).ready(function() {
Controls();
} );
</script>
</head>
<body>
<p>Pressing F1 both activates the button below, and open SketchUp help.</p>
<button data-access-key="h" class="dlg-callback-help">HELP!</button>
</body>
</html>
HTML
dialog = UI::HtmlDialog.new(
dialog_title: "Dialog Dialog",
width: 300,
height: 180
)
dialog.center
dialog.set_html(html)
dialog.add_action_callback("help") { puts "Help" }
dialog.showTested on SketchUp 2017 and 18, Win 7.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working