mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Drag & Drop: set a link as external
Summary: Rest assured: external links remain evil, by default. Don't adopt them randomly by induction. Whether you believe it or not, this specific external link merited some deep thoughts on Phorge: - https://we.phorge.it/T15172 So, whenever you use a mouse, a finger, or whenever we have a confirmation dialog or not to prevent onblur disasters, this change is probably consistent with common expectations. Having said, external links remain evil - by default. Closes T15172 Test Plan: - Drag & Drop a File on a Remarkup text - click on the link inside the popup - it opens in a new tab (without risk of form loss) Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15172 Differential Revision: https://we.phorge.it/D25077
This commit is contained in:
parent
4f356838be
commit
b33e373503
1 changed files with 13 additions and 1 deletions
|
@ -115,7 +115,19 @@ JX.install('PhabricatorFileUpload', {
|
|||
|
||||
switch (this.getStatus()) {
|
||||
case 'done':
|
||||
var link = JX.$N('a', {href: this.getPageURI()}, this.getMonogram());
|
||||
|
||||
// In this case the File upload was successful
|
||||
|
||||
var linkAttr = {};
|
||||
linkAttr.href = this.getPageURI();
|
||||
|
||||
// External links are evil as default.
|
||||
// Believe it or not, but some Phorge users brainstormed
|
||||
// for one hour for this specific target="_blank".
|
||||
// https://we.phorge.it/T15172
|
||||
linkAttr.target = '_blank';
|
||||
|
||||
var link = JX.$N('a', linkAttr, this.getMonogram());
|
||||
|
||||
content = [
|
||||
JX.$N('strong', {}, ['Upload Complete (', link, ')']),
|
||||
|
|
Loading…
Reference in a new issue