Use Tool.$link.focus() for highlighting now OOUI styles :focus

Change-Id: Ia5b4c68cb49e3954aae7de9a8907f1fb9f205e2c
This commit is contained in:
Ed Sanders 2018-05-02 12:52:17 +01:00
parent f9cac9f0ce
commit 1a4158f6d2

View file

@ -40,8 +40,7 @@
driver.executeAsyncScript(
// This function is converted to a string and executed in the browser
function () {
var $lastHighlighted,
done = arguments[ arguments.length - 1 ];
var done = arguments[ arguments.length - 1 ];
window.seleniumUtils = {
getBoundingRect: function ( elements ) {
@ -80,14 +79,6 @@
}
} );
},
highlight: function ( element ) {
var $element = $( element );
if ( $lastHighlighted ) {
$lastHighlighted.css( 'outline', '' );
}
$element.css( 'outline', '2px solid #36c' );
$lastHighlighted = $element;
},
runMenuTask: function ( done, tool, expanded, highlight, extraElements ) {
var toolGroup = tool.toolGroup;
@ -99,7 +90,7 @@
}
if ( highlight ) {
seleniumUtils.highlight( tool.$element[ 0 ] );
tool.$link.focus();
}
setTimeout( function () {