1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    2
    Vote Rating
    0
    baraky is on a distinguished road

      0  

    Default Unanswered: Button href and padding problem

    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
    4,994
    Answers
    381
    Vote Rating
    183
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      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
    baraky is on a distinguished road

      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.

Thread Participants: 1

Tags for this Thread