The 'Insert link' button is disabled when an invalid page name is entered, but is enabled when the title input is empty (e.g. when the dialog is first opened). It does show an alert when trying to insert an empty title, but it'd be nicer to just now allow the button to be pressed (and so get rid of the alert altogether).
Description
Details
Related Objects
Event Timeline
Change 741996 had a related patch set uploaded (by Samwilson; author: Samwilson):
[mediawiki/extensions/WikiEditor@master] Disable link-insert button if target is empty
Change 741996 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Disable link-insert button if target is empty
@Samwilson If I close the Insert link dialog with some valid input, when I re-open it the insert-link button is disabled (even if the input is valid).
This does not happen in the parent commit (7fbd917c152ada0852a166ed97541472b874a963).
Open dialog first time, enter some valid input:
Close the dialog (pressing cancel or x) and re-open it:
Change 744902 had a related patch set uploaded (by Samwilson; author: Samwilson):
[mediawiki/extensions/WikiEditor@master] Fix link-inserter event value when dialog opens
Change 744902 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Fix link-inserter event value when dialog opens
I am a bit confused by the description in this task. Are we supposed to be seeing the alert when the link is empty?
This happens when I press enter (because the button is disabled):
Notes for QA:
- Using the source editor, start editing any page on beta (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:Random)
- Open the "Insert link" dialog
The button that says "Insert link" should be disabled.
I am not sure what should happen if you press the enter key.
Please also read: Things to consider when testing
Insert button is disabled when title is blank. When user clicks on the disabled insert button nothing happens, the title field is highlighted in red.
I also confirmed that when user enters text, the insert button is enabled and insert link is enabled.