Correctly place CategoryPopupWidget in RTL

The previous check for RTL did not properly recognize
when the UI was in RTL, since the element in question has no explicit
'dir' attribute. The test now uses $element.css( 'direction' ) which
is inherited, and produces a correct result.

Change-Id: Ie30c2038428b10709dc30cb8320bdc94d76a5a18
Merge "Correctly place CategoryPopupWidget in RTL"