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' } }
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
Post a Comment