Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI::WebDialog navigator.userAgent doesn't report "SketchUp" Since 23.x #984

Open
thomthom opened this issue Jun 11, 2024 · 1 comment
Open

Comments

@thomthom
Copy link
Member

html = '
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta http-equiv="MSThemeCompatible" content="Yes">
</head>
<script>

function hello() {
  alert("hello")
  window.location="skp:helloWorld@Thom";
  alert("world")
}

</script>
<body>

<button type="button" onclick="window.location=skp:helloWorld@Thom">Hello</button>
<button type="button" onclick="hello()">Test</button>
<button type="button" onclick="alert(navigator.userAgent)">Hi</button>

</body>
</html>
'

@wd = UI::WebDialog.new
@wd.set_html(html)
@wd.add_action_callback('helloWorld') { |dialog, params|
  puts 'helloWorld'
  p params
}
@wd.show

@wd.execute_script('window.location = "skp:helloWorld@hi"')

Not sure if this regressions happened with SU2023.0 or one of the minor updates. But it's still broken in SU2024.0

@sketchup
Copy link

sketchup bot commented Jun 12, 2024

Logged as: SKEXT-4229

@sketchup sketchup bot added the logged label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant