Skip to content

Commit 9a80b26

Browse files
committed
[bug] fix group name input and button not being disabled when name is not shown
1 parent b3418bc commit 9a80b26

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/js/link.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,13 +537,13 @@ var link = (function(){
537537
vargroupFormInputNameIndent=helper.node("div|class:form-indent");
538538
vargroupFormInputNameWrap=helper.node("div|class:form-wrap");
539539
vargroupFormInputName=helper.node("input|type:text,class:group-form-input-name,id:group-form-input-name,placeholder:Example group,tabindex:1,autocomplete:off,autocorrect:off,autocapitalize:off,spellcheck:false");
540+
vargroupFormRandomNameButtonWrap=helper.node("div|class:form-wrap");
541+
vargroupFormRandomNameButton=helper.node("button:Random Group name|class:button,type:button,tabindex:1");
540542

541543
// group position
542544
vargroupFormPositionInputWrap=helper.node("div|class:form-wrap");
543545
vargroupFormPositionLabel=helper.node("label:Position|for:group-form-position");
544546
vargroupFormPositionSelect=helper.node("select|id:group-form-position,class:group-form-position,tabindex:1");
545-
vargroupFormRandomNameButtonWrap=helper.node("div|class:form-wrap");
546-
vargroupFormRandomNameButton=helper.node("button:Random Group name|class:button,type:button,tabindex:1");
547547

548548
// open all
549549
vargroupFormOpenAllInputWrap=helper.node("div|class:form-wrap");
@@ -596,6 +596,10 @@ var link = (function(){
596596
groupFormPositionSelect.selectedIndex=stagedGroup.position.origin;
597597
groupFormInputName.value=stagedGroup.group.name.text;
598598
groupFormOpenAllInput.checked=stagedGroup.group.openAll.show;
599+
if(!stagedGroup.group.name.show){
600+
groupFormInputName.setAttribute("disabled","");
601+
groupFormRandomNameButton.setAttribute("disabled","");
602+
};
599603
};
600604

601605
varsetLastPosition=function(){

0 commit comments

Comments
(0)