Gutenberg: Insert Link: up/down arrow in link autocomplete crashes block

Created on 17 Oct 2018  路  3Comments  路  Source: WordPress/gutenberg

Describe the bug
Pressing the up or down arrow in the link autocomplete field crashes the block

To Reproduce
Steps to reproduce the behavior:

  1. In a paragraph, select text
  2. Click add link
  3. Search to trigger the autocomplete dropdown
  4. Press the up or down arrow key (regardless of whether the autocomplete suggestions is above or below)

Expected behavior
Up or down arrow key should move focus to an item on the list of suggestions.

I saw issue #10496 with the fix #10500 should be included in 4.0 (was it?), but clicking an autocomplete suggestion doesn't insert a link, it just selects a block or two.

With neither mouse or keyboard selection working, it's not possible to insert link using the autocompleter.

Screenshots
screenshot 22
screenshot 23

Console error

TypeError: Cannot read property 'body' of undefined
    at index.js?ver=1539782380:12
    at s (index.js?ver=1539782380:12)
    at Object.offset (index.js?ver=1539782380:12)
    at e.exports (index.js?ver=1539782380:12)
    at t.value (index.js?ver=1539782380:50)
    at jc (react-dom.min.82e21c65.js:134)
    at gc (react-dom.min.82e21c65.js:127)
    at vb (react-dom.min.82e21c65.js:126)
    at ub (react-dom.min.82e21c65.js:126)
    at wg (react-dom.min.82e21c65.js:137)

Desktop:

  • OS: Windows 10
  • Browser Chrome
  • Version WP 4.9.8, GB 4.0
[Feature] UI Components [Type] Bug

Most helpful comment

The fix has now been merged @annestk - thanks again for catching this so soon after the release.

I'm not sure whether there will be an intermediate 4.0.1 release of the plugin, but the fix will make its way into 4.1 at the very least.

All 3 comments

Good find! Tested and confirmed using WordPress 4.9.8 and Gutenberg 4.0 (which was just released) with Firefox 62.0.3 on macOS 10.13.6. I tested both the paragraph block and the button block.

screen shot 2018-10-17 at 11 49 18 am

Thanks for the report @annestk - this does seem to be related to my fix for #10500 馃槥. Working on a fix for the fix now.

The fix has now been merged @annestk - thanks again for catching this so soon after the release.

I'm not sure whether there will be an intermediate 4.0.1 release of the plugin, but the fix will make its way into 4.1 at the very least.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

afercia picture afercia  路  78Comments

davidAIS picture davidAIS  路  129Comments

mapk picture mapk  路  80Comments

smp303 picture smp303  路  98Comments

DeveloperWil picture DeveloperWil  路  102Comments