🛂(frontend) block drag n drop when not desktop
Scrolling on mobile devices was causing issues with drag and drop functionality, documents were being moved unintentionally. This commit disables drag and drop on mobile devices to prevent this issue.
This commit is contained in:
@@ -79,15 +79,23 @@ export const createDoc = async (
|
||||
browserName: string,
|
||||
length: number = 1,
|
||||
isChild: boolean = false,
|
||||
isMobile: boolean = false,
|
||||
) => {
|
||||
const randomDocs = randomName(docName, browserName, length);
|
||||
|
||||
for (let i = 0; i < randomDocs.length; i++) {
|
||||
if (!isChild) {
|
||||
if (!isChild && !isMobile) {
|
||||
const header = page.locator('header').first();
|
||||
await header.locator('h2').getByText('Docs').click();
|
||||
}
|
||||
|
||||
if (isMobile) {
|
||||
await page
|
||||
.getByRole('button', { name: 'Open the header menu' })
|
||||
.getByText('menu')
|
||||
.click();
|
||||
}
|
||||
|
||||
await page
|
||||
.getByRole('button', {
|
||||
name: 'New doc',
|
||||
|
||||
Reference in New Issue
Block a user