Page MenuHomePhabricator

D15313.id.diff
No OneTemporary

D15313.id.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => '7935f211',
- 'core.pkg.js' => '298d5888',
+ 'core.pkg.js' => '7d8faf57',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '2de124c9',
'differential.pkg.js' => 'd0cd0df6',
@@ -462,7 +462,7 @@
'rsrc/js/core/Notification.js' => 'ccf1cbf8',
'rsrc/js/core/Prefab.js' => 'e67df814',
'rsrc/js/core/ShapedRequest.js' => '7cbe244b',
- 'rsrc/js/core/TextAreaUtils.js' => '9e54692d',
+ 'rsrc/js/core/TextAreaUtils.js' => '5813016a',
'rsrc/js/core/Title.js' => 'df5e11d2',
'rsrc/js/core/ToolTip.js' => '6323f942',
'rsrc/js/core/behavior-active-nav.js' => 'e379b58e',
@@ -775,7 +775,7 @@
'phabricator-slowvote-css' => 'da0afb1b',
'phabricator-source-code-view-css' => 'cbeef983',
'phabricator-standard-page-view' => 'e709f6d0',
- 'phabricator-textareautils' => '9e54692d',
+ 'phabricator-textareautils' => '5813016a',
'phabricator-title' => 'df5e11d2',
'phabricator-tooltip' => '6323f942',
'phabricator-ui-example-css' => '528b19de',
@@ -1275,6 +1275,11 @@
'javelin-request',
'javelin-util',
),
+ '5813016a' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-vector',
+ ),
'59a7976a' => array(
'javelin-install',
'javelin-dom',
@@ -1621,11 +1626,6 @@
'phabricator-phtize',
'changeset-view-manager',
),
- '9e54692d' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-vector',
- ),
'9f36c42d' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/webroot/rsrc/js/core/TextAreaUtils.js b/webroot/rsrc/js/core/TextAreaUtils.js
--- a/webroot/rsrc/js/core/TextAreaUtils.js
+++ b/webroot/rsrc/js/core/TextAreaUtils.js
@@ -33,7 +33,14 @@
setSelectionRange : function(area, start, end) {
if ('setSelectionRange' in area) {
+
+ // Chrome scrolls the textarea to the bottom as a side effect of
+ // calling focus(), so save the scroll position, focus, then restore
+ // the scroll position.
+ var scroll_top = area.scrollTop;
area.focus();
+ area.scrollTop = scroll_top;
+
area.setSelectionRange(start, end);
}
},

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 5, 5:25 PM (16 h, 52 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7226125
Default Alt Text
D15313.id.diff (2 KB)

Event Timeline