@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+38 -28
+26 -26
resources/celerity/map.php
··· 14 14 'differential.pkg.js' => '36bec171', 15 15 'diffusion.pkg.css' => '3783278d', 16 16 'diffusion.pkg.js' => '077e3ad0', 17 - 'javelin.pkg.js' => 'd4d2c5ae', 17 + 'javelin.pkg.js' => 'b4831ebf', 18 18 'maniphest.pkg.css' => 'f1887d71', 19 19 'maniphest.pkg.js' => '2fe8af22', 20 20 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', ··· 169 169 'rsrc/externals/font/fontawesome/fontawesome-webfont.woff' => 'c713570f', 170 170 'rsrc/externals/font/sourcesans/SourceSansPro.woff' => '3614608c', 171 171 'rsrc/externals/font/sourcesans/SourceSansProBold.woff' => 'cbf46566', 172 - 'rsrc/externals/javelin/core/Event.js' => '49a59508', 172 + 'rsrc/externals/javelin/core/Event.js' => '69815cac', 173 173 'rsrc/externals/javelin/core/Stratcom.js' => 'c293f7b9', 174 174 'rsrc/externals/javelin/core/__tests__/event-stop-and-kill.js' => '717554e4', 175 175 'rsrc/externals/javelin/core/__tests__/install.js' => 'c432ee85', ··· 208 208 'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692', 209 209 'rsrc/externals/javelin/lib/Router.js' => '29274e2b', 210 210 'rsrc/externals/javelin/lib/URI.js' => 'd9a9b862', 211 - 'rsrc/externals/javelin/lib/Vector.js' => '039fb90d', 211 + 'rsrc/externals/javelin/lib/Vector.js' => 'bd0aedcd', 212 212 'rsrc/externals/javelin/lib/Workflow.js' => '09b15cf1', 213 213 'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8', 214 214 'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b', ··· 645 645 'javelin-diffusion-locate-file-source' => '5afdb2f8', 646 646 'javelin-dom' => '07d99a3d', 647 647 'javelin-dynval' => 'f6555212', 648 - 'javelin-event' => '49a59508', 648 + 'javelin-event' => '69815cac', 649 649 'javelin-fx' => '54b612ba', 650 650 'javelin-history' => 'c60f4327', 651 651 'javelin-install' => '52a92793', ··· 671 671 'javelin-typeahead-static-source' => 'cdde23f1', 672 672 'javelin-uri' => 'd9a9b862', 673 673 'javelin-util' => '65b0b249', 674 - 'javelin-vector' => '039fb90d', 674 + 'javelin-vector' => 'bd0aedcd', 675 675 'javelin-view' => '0f764c35', 676 676 'javelin-view-html' => 'e5b406f9', 677 677 'javelin-view-interpreter' => '0c33c1a0', ··· 846 846 8 => 'javelin-stratcom', 847 847 9 => 'javelin-util', 848 848 ), 849 - '039fb90d' => 850 - array( 851 - 0 => 'javelin-install', 852 - 1 => 'javelin-event', 853 - ), 854 849 '03d6ed07' => 855 850 array( 856 851 0 => 'javelin-behavior', ··· 1167 1162 0 => 'javelin-install', 1168 1163 1 => 'javelin-util', 1169 1164 ), 1170 - '49a59508' => 1171 - array( 1172 - 0 => 'javelin-install', 1173 - ), 1174 1165 '4a11ea9c' => 1175 1166 array( 1176 1167 0 => 'javelin-behavior', ··· 1275 1266 2 => 'javelin-util', 1276 1267 3 => 'phabricator-shaped-request', 1277 1268 ), 1278 - '7319e029' => 1279 - array( 1280 - 0 => 'javelin-behavior', 1281 - 1 => 'javelin-dom', 1282 - ), 1283 - '62e18640' => 1284 - array( 1285 - 0 => 'javelin-install', 1286 - 1 => 'javelin-util', 1287 - 2 => 'javelin-dom', 1288 - 3 => 'javelin-typeahead-normalizer', 1289 - ), 1290 1269 '6453c869' => 1291 1270 array( 1292 1271 0 => 'javelin-install', ··· 1305 1284 1 => 'javelin-util', 1306 1285 2 => 'javelin-request', 1307 1286 3 => 'javelin-typeahead-source', 1287 + ), 1288 + '69815cac' => 1289 + array( 1290 + 0 => 'javelin-install', 1308 1291 ), 1309 1292 '6b3dcf44' => 1310 1293 array( ··· 1329 1312 0 => 'javelin-behavior', 1330 1313 1 => 'javelin-stratcom', 1331 1314 2 => 'javelin-dom', 1315 + ), 1316 + '7319e029' => 1317 + array( 1318 + 0 => 'javelin-behavior', 1319 + 1 => 'javelin-dom', 1320 + ), 1321 + '62e18640' => 1322 + array( 1323 + 0 => 'javelin-install', 1324 + 1 => 'javelin-util', 1325 + 2 => 'javelin-dom', 1326 + 3 => 'javelin-typeahead-normalizer', 1332 1327 ), 1333 1328 '76f4ebed' => 1334 1329 array( ··· 1701 1696 4 => 'phuix-action-list-view', 1702 1697 5 => 'phuix-action-view', 1703 1698 6 => 'javelin-workflow', 1699 + ), 1700 + 'bd0aedcd' => 1701 + array( 1702 + 0 => 'javelin-install', 1703 + 1 => 'javelin-event', 1704 1704 ), 1705 1705 'bd4c8dca' => 1706 1706 array(
+6 -1
webroot/rsrc/externals/javelin/core/Event.js
··· 158 158 } 159 159 160 160 if (('button' in r) && r.button) { 161 - return false; 161 + if ('which' in r) { 162 + return false; 163 + // IE won't have which and has left click == 1 here 164 + } else if (r.button != 1) { 165 + return false; 166 + } 162 167 } 163 168 164 169 return true;
+6 -1
webroot/rsrc/externals/javelin/lib/Vector.js
··· 224 224 JX.Event && (node instanceof JX.Event) && (node = node.getRawEvent()); 225 225 226 226 if (node.getBoundingClientRect) { 227 - var rect = node.getBoundingClientRect(); 227 + var rect; 228 + try { 229 + rect = node.getBoundingClientRect(); 230 + } catch (e) { 231 + rect = { top : 0, left : 0 }; 232 + } 228 233 return new JX.Vector( 229 234 rect.left + window.pageXOffset, 230 235 rect.top + window.pageYOffset);