How to copy text with your finger in ExtJS?

111 Views Asked by At

I'm using ExtJs 7 - Modern

Unfortunately, in all objects, text cannot be copied in the usual way by selecting it with a finger.

Can you please tell me if there is any solution for this feature?

1

There are 1 best solutions below

1
mcg1103 On BEST ANSWER

By default most components are not user selectable.

Set the body of a container as user selectable and you can select the text with your finger or a mouse.

xtype: 'container',
userCls: 'ordersummary',
style: {
  'border': '1px solid black',
  'padding': '5px',
  'margin': '0 0 5px 0'
},
// this is what makes it selectable.
userSelectable: {
  bodyElement: 'text'
},

see the userSelectable config for Ext.Container. it is basically setting the user-select