File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import {showGlobalErrorMessage} from '../bootstrap.js';
7
7
import { attachDropdownAria } from './aria.js' ;
8
8
import { handleGlobalEnterQuickSubmit } from './comp/QuickSubmit.js' ;
9
9
import { initTooltip } from '../modules/tippy.js' ;
10
+ import { svg } from '../svg.js' ;
10
11
11
12
const { appUrl, csrfToken} = window . config ;
12
13
@@ -169,10 +170,10 @@ export function initGlobalDropzone() {
169
170
$dropzone . find ( '.files' ) . append ( input ) ;
170
171
// Create a "Copy Link" element, to conveniently copy the image
171
172
// or file link as Markdown to the clipboard
172
- const copyLinkElement = document . createElement ( 'a ' ) ;
173
- copyLinkElement . className = 'dz-remove ' ;
174
- copyLinkElement . href = '#' ;
175
- copyLinkElement . innerHTML = '<i class="fa fa-copy"></i> Copy link';
173
+ const copyLinkElement = document . createElement ( 'div ' ) ;
174
+ copyLinkElement . className = 'tc ' ;
175
+ // The a element has a hardcoded cursor: pointer because the default is overridden by .dropzone
176
+ copyLinkElement . innerHTML = `<a href="#" style="cursor: pointer;"> ${ svg ( 'octicon-copy' , 14 , 'copy link') } Copy link</a>` ;
176
177
copyLinkElement . addEventListener ( 'click' , ( e ) => {
177
178
e . preventDefault ( ) ;
178
179
let fileMarkdown = `[${ file . name } ](/attachments/${ file . uuid } )` ;
You can’t perform that action at this time.
0 commit comments