@@ -380,27 +380,6 @@ function RemoteFunctions(config = {}) {
380380 }
381381 }
382382
383- /**
384- * this is for duplicate button. Read '_handleDeleteOptionClick' jsdoc to understand more on how this works
385- * @param {Event } event
386- * @param {DOMElement } element - the HTML DOM element that was clicked.
387- */
388- function _handleDuplicateOptionClick ( event , element ) {
389- if ( LivePreviewView . isElementEditable ( element ) ) {
390- const tagId = element . getAttribute ( GLOBALS . DATA_BRACKETS_ID_ATTR ) ;
391-
392- window . _Brackets_MessageBroker . send ( {
393- livePreviewEditEnabled : true ,
394- element : element ,
395- event : event ,
396- tagId : Number ( tagId ) ,
397- duplicate : true
398- } ) ;
399- } else {
400- console . error ( "The TagID might be unavailable or the element tag is directly body or html" ) ;
401- }
402- }
403-
404383 /**
405384 * this is for cut button, when user clicks on cut button we copy the element's source code
406385 * into the clipboard and remove it from the src code. read `_cutElementToClipboard` in `LivePreviewEdit.js`
@@ -503,9 +482,6 @@ function RemoteFunctions(config = {}) {
503482 _handleSelectParentOptionClick ( e , element ) ;
504483 } else if ( action === "edit-text" ) {
505484 startEditing ( element ) ;
506- } else if ( action === "duplicate" ) {
507- _handleDuplicateOptionClick ( e , element ) ;
508- return true ;
509485 } else if ( action === "delete" ) {
510486 _handleDeleteOptionClick ( e , element ) ;
511487 } else if ( action === "cut" ) {
@@ -963,10 +939,8 @@ function RemoteFunctions(config = {}) {
963939 </span>` ;
964940 }
965941
966- // Always include duplicate and delete options
967- content += `<span data-action="duplicate" title="${ strings . duplicate } ">
968- ${ icons . duplicate }
969- </span>
942+ // Always include delete options
943+ content += `
970944 <span data-action="delete" title="${ strings . delete } ">
971945 ${ icons . trash }
972946 </span>
@@ -1022,7 +996,7 @@ function RemoteFunctions(config = {}) {
1022996 }
1023997 } else {
1024998 const keepExitingToolBox = handleOptionClick ( event , action , this . element ) ;
1025- // as we don't want to remove the options box on duplicate button click
999+ // as we don't want to remove the options box on certain items, for eg: duplicate
10261000 if ( ! keepExitingToolBox ) {
10271001 this . remove ( ) ;
10281002 }
0 commit comments