Page MenuHomePhabricator

Opening link inspector should focus the link target input
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

I want to insert an external link, so I follow these steps:

  • Go to the web page I want to link to, and copy its URL to the clipboard
  • Open a page in VE
  • Select some plain text
  • Press Ctrl+K (or Cmd+K) to open the link inspector
  • Press Ctrl+V (or Cmd+V) to paste the URL
  • Select some other plain text
  • Press Ctrl+K (or Cmd+K) to open the link inspector
  • Press Ctrl+V (or Cmd+V) to paste the URL

What happens?:
Nothing. The URL is not pasted. Typing goes nowhere

What should have happened instead?:
The link target input should be focused when the link inspector is opened, so that I can type a page name or paste a URL.

Software version (skip for WMF-hosted wikis like Wikipedia):
Current production version (I encountered this on mediawiki.org) in Chrome

Other information (browser name/version, screenshots, etc.):
The same bug happens when I open the link inspector on something that is already an internal link (link to a wiki page). The bug does not happen when I open the link inspector on an existing external link (link to a URL): in that case the input does get focus when the inspector opens. This makes me suspect the issue is with the internal link tab of the link inspector, and not directly related to the fact that I'm creating a new link.

Event Timeline

Initially I couldn't reproduce, but as with T285626, it only happens the second time I open the inspector.

Change 858585 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Link inspector: Avoid focussing a input when it isn't visible

https://gerrit.wikimedia.org/r/858585

Change 858585 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Link inspector: Avoid focussing a input when it isn't visible

https://gerrit.wikimedia.org/r/858585