Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Only first element is focused inside the dialog #3263

Open
@MuthuSelviC

Description

After opening the dialog, first element is focused with the tooltip as shown in the image.

Image

On clicking the Next on the tooltip, it moves to the next element. Now the element is not focused. Only tooltip is shown.

Image

It only focus on the first element. On clciking the Next button, tooltip is shown. but input is not focused

This is my code
localUserTour.addStep ( {
id : 'local-username',
text : 'Enter local username',
attachTo : {
element : null,
on : 'bottom'
},
buttons : [
{
text : 'Skip',
action : () => localUserTour.cancel (), // exit the tour
classes : 'shepherd-button-skip'
},
{
text : 'Next',
action : () => localUserTour.next ()
}
],
beforeShowPromise : () => {
return new Promise ( ( resolve ) => {
const checkEl = setInterval ( () => {
const input = document.querySelector ( 'input[data-cy="local-username"]' );
console.log ( "input checkbox", input );
if ( input ) {
console.log ( "Inside input upper lower case" );
clearInterval ( checkEl );
const step = localUserTour.getCurrentStep ();
setTimeout ( () => {
step.updateStepOptions ( {
attachTo : { element : input, on : 'bottom' }
} );
resolve ();
}, 300 );
}
}, 100 );
} );
}
} );

localUserTour.addStep ( {
	id : 'login',
	text : 'Enter local user login',
	attachTo : {
		element : null,
		on : 'bottom'
	},
	buttons : [
		{
			text : 'Skip',
			action : () => localUserTour.cancel (), // exit the tour
			classes : 'shepherd-button-skip'
		},
		{
			text : 'Next',
			action : () => localUserTour.next ()
		}
	],
	beforeShowPromise : () => {
		return new Promise ( ( resolve ) => {
			const checkEl = setInterval ( () => {
				const input = document.querySelector ( 'input[data-cy="login"]' );
				console.log ( "input checkbox", input );
				if ( input ) {
					console.log ( "Inside input upper lower case" );
					clearInterval ( checkEl );
					const step = localUserTour.getCurrentStep ();
					setTimeout ( () => {
						step.updateStepOptions ( {
							attachTo : { element : input, on : 'bottom' }
						} );
						resolve ();
					}, 100 );
				}
			}, 100 );
		} );
	}
} );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /