mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Merge ""Use an existing reference" in the reference dialog should be disabled when there is content"
This commit is contained in:
commit
21ab1a9b7e
|
@ -140,9 +140,10 @@ ve.ui.MWReferenceDialog.static.pasteRules = ve.extendObject(
|
|||
ve.ui.MWReferenceDialog.prototype.onDocumentTransact = function () {
|
||||
var data = this.referenceSurface.getContent(),
|
||||
// TODO: Check for other types of empty, e.g. only whitespace?
|
||||
disabled = data.length <= 4;
|
||||
applyDisabled = data.length <= 4;
|
||||
|
||||
this.applyButton.setDisabled( disabled );
|
||||
this.applyButton.setDisabled( applyDisabled );
|
||||
this.selectButton.setDisabled( !applyDisabled );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue