Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't return focus to initial element for Actions #3024

Closed

Conversation

raimund-schluessler
Copy link
Contributor

@raimund-schluessler raimund-schluessler commented Aug 12, 2022

This PR is aimed at enabling this use case:

<template>
    <div>
        <input ref="input" />
        <Actions>
            <ActionButton @click="focusInput" :close-after-click="true">
                <template #icon>
                    <Delete :size="20" />
                </template>
                Focus input
            </ActionButton>
            <ActionButton @click="actionDelete">
                <template #icon>
                    <Delete :size="20" />
                </template>
                Delete
            </ActionButton>
        </Actions>
    </div>
</template>
<script>
import Delete from 'vue-material-design-icons/Delete'

export default {
	components: {
		Delete,
	},
	methods: {
		actionDelete() {
			alert('Delete')
		},
		async focusInput() {
			await this.$nextTick()
            this.$refs.input.focus()
		},
	},
}
</script>

but unfortunately, it doesn't solve the issue. Closing.

Comment on lines 177 to +178
allowOutsideClick: true,
returnFocusOnDeactivate: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the both options should be provided by props.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, maybe. But setting returnFocusOnDeactivate: false, does not solve the issue anyway, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants