extjs5 - Disable text drag in a Textfield using ExtJS -


my requirement have disable text drag , drop 1 textfield other.however, manual copy , paste should allowed.

me.commentstext = ext.widget('textfield',{                       maxlength: 40,             enforcemaxlength:true,             selectonfocus : true,             fieldstyle: {                  'font': 'normal 13px roboto'              } } 

enter image description here

please kindly advise.

you can prevent drag , drop copy pasteing removing data passed along drag , drop series of events. extjs doesn't expose these events form fields, have grab ext.dom.element textfield , attach there. should give option of discarding data transported via drag before dropped new field.

see below example:

me.commentstext = ext.widget('textfield',{               maxlength: 40,     enforcemaxlength:true,     selectonfocus : true,     fieldstyle: {         'font': 'normal 13px roboto'     } });  me.commentstext.getel().on('drop', function(event) {     event.preventdefault(); }); 

Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -