Results 1 to 3 of 3

Thread: Button href and padding problem

  1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    2
    Vote Rating
    0
      0  

    Default Unanswered: Button href and padding problem

    Hi all
    I want to use button with href and padding. The issue is that href wont affect the button padding. I've found a patch - to use handler, but shouldn't the href affect the padding automatically?


    Code:
    Ext.create('Ext.Button', {    
        text: 'Go to google',    
        padding:'50 50 50 50',    
        renderTo: Ext.getBody(),    
        href: 'http://google.com',    
        handler: function(btn) {
              window.location = btn.href    
        }
    });

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Answers
    501
    Vote Rating
    247
      0  

    Default

    I'm not sure I follow, yet. I'm not understanding the relationship between padding and href.

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    2
    Vote Rating
    0
      0  

    Default

    A button padding is also clickable (for a regular button, if you click outside the text, it still "clicks"), but with href attribute, only the text is clickable (unless using handler)

    You can check this fiddle and see it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •