mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Internet Explorer compatibility fixes
Summary: A few fixes for IE that makes this work in IE9+ and at least you can drag things and have it fail horribly in IE8 now. Ref T5023. - try / catch around getBoundingClientRect because IE throws if the object is not attached to the DOM. The correct value can be inferred in these cases as 0,0 - turns out IE has different values for button here (1,2,4) than other browsers. special case this by using the other IE fact that 'which' will be null Test Plan: dragged and dropped tasks successfully in IE9, IE10, and IE11 on Windows 7. dragged and dropped tasks unsuccessfully in IE8 on Windows 7 - they always "drop" to the 2nd position or so as I think the ondrag code isn't firing properly or something Reviewers: chad, epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5023 Differential Revision: https://secure.phabricator.com/D9118
This commit is contained in:
parent
348ca4207c
commit
7ab26aef66
3 changed files with 38 additions and 28 deletions
|
@ -14,7 +14,7 @@ return array(
|
||||||
'differential.pkg.js' => '36bec171',
|
'differential.pkg.js' => '36bec171',
|
||||||
'diffusion.pkg.css' => '3783278d',
|
'diffusion.pkg.css' => '3783278d',
|
||||||
'diffusion.pkg.js' => '077e3ad0',
|
'diffusion.pkg.js' => '077e3ad0',
|
||||||
'javelin.pkg.js' => 'd4d2c5ae',
|
'javelin.pkg.js' => 'b4831ebf',
|
||||||
'maniphest.pkg.css' => 'f1887d71',
|
'maniphest.pkg.css' => 'f1887d71',
|
||||||
'maniphest.pkg.js' => '2fe8af22',
|
'maniphest.pkg.js' => '2fe8af22',
|
||||||
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
|
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
|
||||||
|
@ -169,7 +169,7 @@ return array(
|
||||||
'rsrc/externals/font/fontawesome/fontawesome-webfont.woff' => 'c713570f',
|
'rsrc/externals/font/fontawesome/fontawesome-webfont.woff' => 'c713570f',
|
||||||
'rsrc/externals/font/sourcesans/SourceSansPro.woff' => '3614608c',
|
'rsrc/externals/font/sourcesans/SourceSansPro.woff' => '3614608c',
|
||||||
'rsrc/externals/font/sourcesans/SourceSansProBold.woff' => 'cbf46566',
|
'rsrc/externals/font/sourcesans/SourceSansProBold.woff' => 'cbf46566',
|
||||||
'rsrc/externals/javelin/core/Event.js' => '49a59508',
|
'rsrc/externals/javelin/core/Event.js' => '69815cac',
|
||||||
'rsrc/externals/javelin/core/Stratcom.js' => 'c293f7b9',
|
'rsrc/externals/javelin/core/Stratcom.js' => 'c293f7b9',
|
||||||
'rsrc/externals/javelin/core/__tests__/event-stop-and-kill.js' => '717554e4',
|
'rsrc/externals/javelin/core/__tests__/event-stop-and-kill.js' => '717554e4',
|
||||||
'rsrc/externals/javelin/core/__tests__/install.js' => 'c432ee85',
|
'rsrc/externals/javelin/core/__tests__/install.js' => 'c432ee85',
|
||||||
|
@ -208,7 +208,7 @@ return array(
|
||||||
'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692',
|
'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692',
|
||||||
'rsrc/externals/javelin/lib/Router.js' => '29274e2b',
|
'rsrc/externals/javelin/lib/Router.js' => '29274e2b',
|
||||||
'rsrc/externals/javelin/lib/URI.js' => 'd9a9b862',
|
'rsrc/externals/javelin/lib/URI.js' => 'd9a9b862',
|
||||||
'rsrc/externals/javelin/lib/Vector.js' => '039fb90d',
|
'rsrc/externals/javelin/lib/Vector.js' => 'bd0aedcd',
|
||||||
'rsrc/externals/javelin/lib/Workflow.js' => '09b15cf1',
|
'rsrc/externals/javelin/lib/Workflow.js' => '09b15cf1',
|
||||||
'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8',
|
'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8',
|
||||||
'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b',
|
'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b',
|
||||||
|
@ -645,7 +645,7 @@ return array(
|
||||||
'javelin-diffusion-locate-file-source' => '5afdb2f8',
|
'javelin-diffusion-locate-file-source' => '5afdb2f8',
|
||||||
'javelin-dom' => '07d99a3d',
|
'javelin-dom' => '07d99a3d',
|
||||||
'javelin-dynval' => 'f6555212',
|
'javelin-dynval' => 'f6555212',
|
||||||
'javelin-event' => '49a59508',
|
'javelin-event' => '69815cac',
|
||||||
'javelin-fx' => '54b612ba',
|
'javelin-fx' => '54b612ba',
|
||||||
'javelin-history' => 'c60f4327',
|
'javelin-history' => 'c60f4327',
|
||||||
'javelin-install' => '52a92793',
|
'javelin-install' => '52a92793',
|
||||||
|
@ -671,7 +671,7 @@ return array(
|
||||||
'javelin-typeahead-static-source' => 'cdde23f1',
|
'javelin-typeahead-static-source' => 'cdde23f1',
|
||||||
'javelin-uri' => 'd9a9b862',
|
'javelin-uri' => 'd9a9b862',
|
||||||
'javelin-util' => '65b0b249',
|
'javelin-util' => '65b0b249',
|
||||||
'javelin-vector' => '039fb90d',
|
'javelin-vector' => 'bd0aedcd',
|
||||||
'javelin-view' => '0f764c35',
|
'javelin-view' => '0f764c35',
|
||||||
'javelin-view-html' => 'e5b406f9',
|
'javelin-view-html' => 'e5b406f9',
|
||||||
'javelin-view-interpreter' => '0c33c1a0',
|
'javelin-view-interpreter' => '0c33c1a0',
|
||||||
|
@ -846,11 +846,6 @@ return array(
|
||||||
8 => 'javelin-stratcom',
|
8 => 'javelin-stratcom',
|
||||||
9 => 'javelin-util',
|
9 => 'javelin-util',
|
||||||
),
|
),
|
||||||
'039fb90d' =>
|
|
||||||
array(
|
|
||||||
0 => 'javelin-install',
|
|
||||||
1 => 'javelin-event',
|
|
||||||
),
|
|
||||||
'03d6ed07' =>
|
'03d6ed07' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-behavior',
|
0 => 'javelin-behavior',
|
||||||
|
@ -1167,10 +1162,6 @@ return array(
|
||||||
0 => 'javelin-install',
|
0 => 'javelin-install',
|
||||||
1 => 'javelin-util',
|
1 => 'javelin-util',
|
||||||
),
|
),
|
||||||
'49a59508' =>
|
|
||||||
array(
|
|
||||||
0 => 'javelin-install',
|
|
||||||
),
|
|
||||||
'4a11ea9c' =>
|
'4a11ea9c' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-behavior',
|
0 => 'javelin-behavior',
|
||||||
|
@ -1275,18 +1266,6 @@ return array(
|
||||||
2 => 'javelin-util',
|
2 => 'javelin-util',
|
||||||
3 => 'phabricator-shaped-request',
|
3 => 'phabricator-shaped-request',
|
||||||
),
|
),
|
||||||
'7319e029' =>
|
|
||||||
array(
|
|
||||||
0 => 'javelin-behavior',
|
|
||||||
1 => 'javelin-dom',
|
|
||||||
),
|
|
||||||
'62e18640' =>
|
|
||||||
array(
|
|
||||||
0 => 'javelin-install',
|
|
||||||
1 => 'javelin-util',
|
|
||||||
2 => 'javelin-dom',
|
|
||||||
3 => 'javelin-typeahead-normalizer',
|
|
||||||
),
|
|
||||||
'6453c869' =>
|
'6453c869' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-install',
|
0 => 'javelin-install',
|
||||||
|
@ -1306,6 +1285,10 @@ return array(
|
||||||
2 => 'javelin-request',
|
2 => 'javelin-request',
|
||||||
3 => 'javelin-typeahead-source',
|
3 => 'javelin-typeahead-source',
|
||||||
),
|
),
|
||||||
|
'69815cac' =>
|
||||||
|
array(
|
||||||
|
0 => 'javelin-install',
|
||||||
|
),
|
||||||
'6b3dcf44' =>
|
'6b3dcf44' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-install',
|
0 => 'javelin-install',
|
||||||
|
@ -1330,6 +1313,18 @@ return array(
|
||||||
1 => 'javelin-stratcom',
|
1 => 'javelin-stratcom',
|
||||||
2 => 'javelin-dom',
|
2 => 'javelin-dom',
|
||||||
),
|
),
|
||||||
|
'7319e029' =>
|
||||||
|
array(
|
||||||
|
0 => 'javelin-behavior',
|
||||||
|
1 => 'javelin-dom',
|
||||||
|
),
|
||||||
|
'62e18640' =>
|
||||||
|
array(
|
||||||
|
0 => 'javelin-install',
|
||||||
|
1 => 'javelin-util',
|
||||||
|
2 => 'javelin-dom',
|
||||||
|
3 => 'javelin-typeahead-normalizer',
|
||||||
|
),
|
||||||
'76f4ebed' =>
|
'76f4ebed' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-install',
|
0 => 'javelin-install',
|
||||||
|
@ -1702,6 +1697,11 @@ return array(
|
||||||
5 => 'phuix-action-view',
|
5 => 'phuix-action-view',
|
||||||
6 => 'javelin-workflow',
|
6 => 'javelin-workflow',
|
||||||
),
|
),
|
||||||
|
'bd0aedcd' =>
|
||||||
|
array(
|
||||||
|
0 => 'javelin-install',
|
||||||
|
1 => 'javelin-event',
|
||||||
|
),
|
||||||
'bd4c8dca' =>
|
'bd4c8dca' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-install',
|
0 => 'javelin-install',
|
||||||
|
|
7
webroot/rsrc/externals/javelin/core/Event.js
vendored
7
webroot/rsrc/externals/javelin/core/Event.js
vendored
|
@ -158,7 +158,12 @@ JX.install('Event', {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (('button' in r) && r.button) {
|
if (('button' in r) && r.button) {
|
||||||
return false;
|
if ('which' in r) {
|
||||||
|
return false;
|
||||||
|
// IE won't have which and has left click == 1 here
|
||||||
|
} else if (r.button != 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
7
webroot/rsrc/externals/javelin/lib/Vector.js
vendored
7
webroot/rsrc/externals/javelin/lib/Vector.js
vendored
|
@ -224,7 +224,12 @@ JX.install('Vector', {
|
||||||
JX.Event && (node instanceof JX.Event) && (node = node.getRawEvent());
|
JX.Event && (node instanceof JX.Event) && (node = node.getRawEvent());
|
||||||
|
|
||||||
if (node.getBoundingClientRect) {
|
if (node.getBoundingClientRect) {
|
||||||
var rect = node.getBoundingClientRect();
|
var rect;
|
||||||
|
try {
|
||||||
|
rect = node.getBoundingClientRect();
|
||||||
|
} catch (e) {
|
||||||
|
rect = { top : 0, left : 0 };
|
||||||
|
}
|
||||||
return new JX.Vector(
|
return new JX.Vector(
|
||||||
rect.left + window.pageXOffset,
|
rect.left + window.pageXOffset,
|
||||||
rect.top + window.pageYOffset);
|
rect.top + window.pageYOffset);
|
||||||
|
|
Loading…
Reference in a new issue