View Full Version : Why does Ext 4.2 use x-form-trigger-first and 4.1 used x-form-trigger-last?

29 Apr 2014, 10:31 AM
So you have a combo box that has a trigger.

In 4.1.x The last trigger button in a combo gets the cls (amongst others) of x-form-trigger-last:

triggerConfigs[i - 1].cn.cls += ' ' + triggerBaseCls + '-last';

But in 4.2 the *first* trigger gets x-form-trigger-first:

triggerConfigs[0].cn.cls += ' ' + triggerBaseCls + '-first';

Why is that such a problem?

Because you can always guarantee the position of the last trigger but not the first - last is always the right-most, first is only right-most if there's only one trigger.

So if, for example you want to make sure your right most trigger has a right border but others don't - easy in 4.1 and very difficult in 4.2:


Looking at the markup you can see why:


If the triggers were in the same table cell, we could rely on :first-of-type, :last-of-type. But they're not.

I can't see any meaningful reason why this change would be necessary. Can anyone help enlighten me? :)

15 Apr 2015, 2:57 AM
Bumping this as I'm finally getting round to our upgrade and this is still an annoying problem I'm going to have to fix....somehow.