@@ -360,27 +360,6 @@ function RemoteFunctions(config = {}) {
360360 } ) ;
361361 }
362362
363- /**
364- * this is for copy button, similar to cut just we don't remove the elements source code
365- * @param {Event } event
366- * @param {DOMElement } element
367- */
368- function _handleCopyOptionClick ( event , element ) {
369- if ( LivePreviewView . isElementEditable ( element ) ) {
370- const tagId = element . getAttribute ( GLOBALS . DATA_BRACKETS_ID_ATTR ) ;
371-
372- window . _Brackets_MessageBroker . send ( {
373- livePreviewEditEnabled : true ,
374- element : element ,
375- event : event ,
376- tagId : Number ( tagId ) ,
377- copy : true
378- } ) ;
379- } else {
380- console . error ( "The TagID might be unavailable or the element tag is directly body or html" ) ;
381- }
382- }
383-
384363 /**
385364 * this is for paste button, this inserts the saved content from clipboard just above this element
386365 * @param {Event } event
@@ -412,8 +391,6 @@ function RemoteFunctions(config = {}) {
412391 function handleOptionClick ( e , action , element ) {
413392 if ( action === "edit-text" ) {
414393 startEditing ( element ) ;
415- } else if ( action === "copy" ) {
416- _handleCopyOptionClick ( e , element ) ;
417394 } else if ( action === "paste" ) {
418395 _handlePasteOptionClick ( e , element ) ;
419396 } else if ( action === "ai" ) {
@@ -1031,10 +1008,6 @@ function RemoteFunctions(config = {}) {
10311008
10321009 let content = `
10331010 <div class="more-options-dropdown">
1034- <div class="dropdown-item" data-action="copy">
1035- <span class="item-icon">${ icons . copy } </span>
1036- <span class="item-label">${ strings . copy } </span>
1037- </div>
10381011 <div class="dropdown-item" data-action="paste">
10391012 <span class="item-icon">${ icons . paste } </span>
10401013 <span class="item-label">${ strings . paste } </span>
@@ -1076,6 +1049,9 @@ function RemoteFunctions(config = {}) {
10761049 const handler = LivePreviewView . getNodeMoreOptionsHandler ( action ) ;
10771050 if ( handler && handler . handleDropdownClick ) {
10781051 handlerHandledIt = handler . handleDropdownClick ( event , this . targetElement , this ) ;
1052+ if ( handlerHandledIt ) {
1053+ this . remove ( ) ;
1054+ }
10791055 }
10801056
10811057 if ( ! handlerHandledIt ) {
0 commit comments