We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I realise the scrollTo($selector) method was added to the core of Dusk.
scrollTo($selector)
However, it might be useful to make use of the Element.scrollIntoView() JavaScript API which ensures the selected element is actually in view? Browser support is also good for this API as well as support for document.querySelector.
Element.scrollIntoView()
document.querySelector
/** * Scroll element into view at the given selector. * * @param string $selector * @return $this */ public function scrollIntoView($selector) { $selector = addslashes($this->resolver->format($selector)); $this->driver->executeScript("document.querySelector(\"$selector\").scrollIntoView();"); return $this; }
The text was updated successfully, but these errors were encountered:
Sure feel free to PR
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I realise the
scrollTo($selector)
method was added to the core of Dusk.However, it might be useful to make use of the
Element.scrollIntoView()
JavaScript API which ensures the selected element is actually in view? Browser support is also good for this API as well as support fordocument.querySelector
.The text was updated successfully, but these errors were encountered: