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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -