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

[EUWE] Fix IE11 VMRC connectivity #15220

Merged
merged 3 commits into from
May 26, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions app/views/vm_common/console_vmrc.html.haml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
= render :partial => 'layouts/doctype'
%html{:lang => I18n.locale.to_s.sub('-', '_')}
%head
- if %w(5.1 5.5 6.0).include?(api_version) && is_browser_ie?
- if browser_info(:version).to_i > 10
%meta{:content => "IE=EmulateIE8", "http-equiv" => "X-UA-Compatible"}
- elsif browser_info(:version).to_i > 9
%meta{:content => "IE=8", "http-equiv" => "X-UA-Compatible"}
%meta{:content => "text/html; charset=ISO-8859-1", "http-equiv" => "Content-Type"}
= favicon_link_tag
= stylesheet_link_tag "vmrc"
-# need jQuery that works in IE8 mode and has $.browser, the plugin is broken in IE9 mode
= javascript_include_tag 'jquery-1.8/jquery'
= javascript_include_tag 'jquery'
= javascript_include_tag 'jquery_overrides'

:javascript
Expand Down Expand Up @@ -328,13 +322,14 @@
}
console.debug("VMRC: is ready to start.");

if ($.browser.msie) {
isIE = #{is_browser_ie?};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var isIE please

if (isIE) {
vmrc.attachEvent("onScreenSizeChange", onSizeChanged);
vmrc.attachEvent("onConnectionStateChange", onConnectionStateChanged);
vmrc.attachEvent("onGrabStateChange", onGrabStateChanged);
vmrc.attachEvent("onMessage", onMessage);
vmrc.attachEvent("onWindowStateChange", onWindowStateChanged);
} else if ($.browser.mozilla || $.browser.chrome) {
} else {
vmrc.onScreenSizeChange = onSizeChanged;
vmrc.onConnectionStateChange = onConnectionStateChanged;
vmrc.onGrabStateChange = onGrabStateChanged;
Expand Down