View Full Version : Button href and padding problem

5 May 2013, 10:07 PM
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?

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

7 May 2013, 10:09 AM
I'm not sure I follow, yet. I'm not understanding the relationship between padding and href.

7 May 2013, 10:06 PM
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 (http://jsfiddle.net/PGu7m/3/) and see it.