EasyUI Forum
March 29, 2024, 01:27:21 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: bug in textbox with button  (Read 5540 times)
kingor2001
Jr. Member
**
Posts: 61


View Profile
« on: October 31, 2017, 03:21:24 AM »

a textbox with a attached button, both the 'readonly' and 'disable' properties can't stop the attached button's click event.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: October 31, 2017, 08:10:54 AM »

When the textbox is disabled, the 'onClickButton' event is disabled too.
Code:
$('#tb').textbox({
  disabled: true,
  buttonText:'SEARCH',
  onClickButton: function(){
    console.log('onClickButton')
  }
})
Logged
kingor2001
Jr. Member
**
Posts: 61


View Profile
« Reply #2 on: October 31, 2017, 09:32:53 AM »

tks. I direct bind click event by jQuery. Now using onClickButton is ok.
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!