EasyUI Forum
May 06, 2024, 07:11:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: textbox can not keep value dropped from outside of browser  (Read 2707 times)
samuelzhu001
Newbie
*
Posts: 11


View Profile
« on: February 20, 2019, 06:59:04 PM »

     When I drag and drop text from the same page into a textbox,it works,but when I  drag and drop text from other application(e.g., MS Word) into a textbox,the textbox can not hold the value which shows in gray color and disapears when focus is got.
   Is it a bug? How to fix it?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: February 21, 2019, 07:27:09 AM »

Please try to attach the 'drop' event handler on the textbox.
Code:
$('#fname').textbox('textbox').bind('drop', function(e){
setTimeout(function(){
$('#fname').textbox('setValue', e.target.value);
},0);
});
Logged
samuelzhu001
Newbie
*
Posts: 11


View Profile
« Reply #2 on: February 22, 2019, 03:07:18 AM »

It works fine. Thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!