mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 20:10:55 +01:00
Resize tokenizer text input after pasting
Summary: Fixes T5251. We don't recompute tokenizer metrics accurately after a paste event. Listen for paste events and redraw the input. Test Plan: Pasted long text into a tokenizer in Safari, Firefox and Chrome. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T5251 Differential Revision: https://secure.phabricator.com/D10442
This commit is contained in:
parent
6f806bd12b
commit
c180832f84
2 changed files with 13 additions and 10 deletions
|
@ -8,7 +8,7 @@
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => '974635bb',
|
'core.pkg.css' => '974635bb',
|
||||||
'core.pkg.js' => 'cebacb31',
|
'core.pkg.js' => '47fd11f0',
|
||||||
'darkconsole.pkg.js' => 'df001cab',
|
'darkconsole.pkg.js' => 'df001cab',
|
||||||
'differential.pkg.css' => '36884139',
|
'differential.pkg.css' => '36884139',
|
||||||
'differential.pkg.js' => '73337d1d',
|
'differential.pkg.js' => '73337d1d',
|
||||||
|
@ -209,7 +209,7 @@ return array(
|
||||||
'rsrc/externals/javelin/lib/__tests__/URI.js' => '003ed329',
|
'rsrc/externals/javelin/lib/__tests__/URI.js' => '003ed329',
|
||||||
'rsrc/externals/javelin/lib/__tests__/behavior.js' => '1ea62783',
|
'rsrc/externals/javelin/lib/__tests__/behavior.js' => '1ea62783',
|
||||||
'rsrc/externals/javelin/lib/behavior.js' => '61cbc29a',
|
'rsrc/externals/javelin/lib/behavior.js' => '61cbc29a',
|
||||||
'rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js' => 'a5b67173',
|
'rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js' => '9f06389f',
|
||||||
'rsrc/externals/javelin/lib/control/typeahead/Typeahead.js' => 'e614d22b',
|
'rsrc/externals/javelin/lib/control/typeahead/Typeahead.js' => 'e614d22b',
|
||||||
'rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js' => '1c22377d',
|
'rsrc/externals/javelin/lib/control/typeahead/normalizer/TypeaheadNormalizer.js' => '1c22377d',
|
||||||
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadCompositeSource.js' => '503e17fd',
|
'rsrc/externals/javelin/lib/control/typeahead/source/TypeaheadCompositeSource.js' => '503e17fd',
|
||||||
|
@ -675,7 +675,7 @@ return array(
|
||||||
'javelin-routable' => 'b3e7d692',
|
'javelin-routable' => 'b3e7d692',
|
||||||
'javelin-router' => '29274e2b',
|
'javelin-router' => '29274e2b',
|
||||||
'javelin-stratcom' => '8b0ad945',
|
'javelin-stratcom' => '8b0ad945',
|
||||||
'javelin-tokenizer' => 'a5b67173',
|
'javelin-tokenizer' => '9f06389f',
|
||||||
'javelin-typeahead' => 'e614d22b',
|
'javelin-typeahead' => 'e614d22b',
|
||||||
'javelin-typeahead-composite-source' => '503e17fd',
|
'javelin-typeahead-composite-source' => '503e17fd',
|
||||||
'javelin-typeahead-normalizer' => '1c22377d',
|
'javelin-typeahead-normalizer' => '1c22377d',
|
||||||
|
@ -1459,6 +1459,12 @@ return array(
|
||||||
'javelin-vector',
|
'javelin-vector',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
),
|
),
|
||||||
|
'9f06389f' => array(
|
||||||
|
'javelin-dom',
|
||||||
|
'javelin-util',
|
||||||
|
'javelin-stratcom',
|
||||||
|
'javelin-install',
|
||||||
|
),
|
||||||
'9f7309fb' => array(
|
'9f7309fb' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
@ -1476,12 +1482,6 @@ return array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'phabricator-notification',
|
'phabricator-notification',
|
||||||
),
|
),
|
||||||
'a5b67173' => array(
|
|
||||||
'javelin-dom',
|
|
||||||
'javelin-util',
|
|
||||||
'javelin-stratcom',
|
|
||||||
'javelin-install',
|
|
||||||
),
|
|
||||||
'a5d7cf86' => array(
|
'a5d7cf86' => array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
),
|
),
|
||||||
|
|
|
@ -88,7 +88,7 @@ JX.install('Tokenizer', {
|
||||||
|
|
||||||
JX.DOM.listen(
|
JX.DOM.listen(
|
||||||
focus,
|
focus,
|
||||||
['click', 'focus', 'blur', 'keydown', 'keypress'],
|
['click', 'focus', 'blur', 'keydown', 'keypress', 'paste'],
|
||||||
null,
|
null,
|
||||||
JX.bind(this, this.handleEvent));
|
JX.bind(this, this.handleEvent));
|
||||||
|
|
||||||
|
@ -222,7 +222,10 @@ JX.install('Tokenizer', {
|
||||||
this._typeahead.updatePlaceholder();
|
this._typeahead.updatePlaceholder();
|
||||||
} else if (e.getType() == 'focus') {
|
} else if (e.getType() == 'focus') {
|
||||||
this._didfocus();
|
this._didfocus();
|
||||||
|
} else if (e.getType() == 'paste') {
|
||||||
|
setTimeout(JX.bind(this, this._redraw), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh : function() {
|
refresh : function() {
|
||||||
|
|
Loading…
Reference in a new issue