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

Disable the navigation mode when clicking the redirect element #17798

Merged
merged 2 commits into from
Oct 9, 2019

Conversation

youknowriad
Copy link
Contributor

closes #17776

Clicking the empty area below the writing prompt should disable navigation mode and create a new block to start typing.

In my testing, the first click puts the caret in the title and the second creates a block, but this might be the expected behavior.

Testing instructions

  • Navigate to Posts > Add New
  • Click below the writing prompt
  • Start typing
  • Note that while the paragraph was created and is focused, your typed characters are not reflected - - - because the caret was not placed within the paragraph

@youknowriad youknowriad added the [Type] Bug An existing feature does not function as intended label Oct 7, 2019
@youknowriad youknowriad requested a review from aduth October 7, 2019 08:44
@youknowriad youknowriad self-assigned this Oct 7, 2019
@ellatrix
Copy link
Member

ellatrix commented Oct 9, 2019

Should we add an e2e test?

@youknowriad
Copy link
Contributor Author

@ellatrix there's already a test but it was running in edit mode directly, I updated it to force "navigation mode"

@@ -29,6 +29,9 @@ describe( 'adding blocks', () => {
}

it( 'Should insert content using the placeholder and the regular inserter', async () => {
// This ensures the editor is loaded in navigation mode.
await page.reload();
Copy link
Member

Choose a reason for hiding this comment

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

Makes me wonder if there's any value in being able to disable it per test case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

90% of our tests require it to be disabled. Initially, I tried disabling it per test but I noticed that I was doing it for almost all the tests.

Copy link
Member

Choose a reason for hiding this comment

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

I know, I meant having some sort of option to disable it when creating a new post for example. Maybe not worth it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right! I think it's a good thing to consider. Let's see how this gets affected by #17088 when implemented.

@youknowriad youknowriad merged commit 867ef68 into master Oct 9, 2019
@youknowriad youknowriad deleted the fix/click-redirect branch October 9, 2019 12:55
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing Flow: Cannot type after clicking below writing prompt in new post
2 participants