mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-10-05 21:03:09 +00:00
Merge pull request #435 from markcxz/master
fix radio input uncheck failed
This commit is contained in:
@@ -118,8 +118,10 @@ GitBookRenderer.prototype._createCheckboxAndRadios = function(text) {
|
||||
if (!match) {
|
||||
return text;
|
||||
}
|
||||
var quizIdentifier = 'quiz-row-' + this.id + '-' + this.quizRowId + '-' + this.quizIndex++;
|
||||
var field = "<input name='" + quizIdentifier + "' id='" + quizIdentifier + "' type='";
|
||||
//fix radio input uncheck failed
|
||||
var quizFieldName='quiz-row-' + this.id + '-' + this.quizRowId ;
|
||||
var quizIdentifier = quizFieldName + '-' + this.quizIndex++;
|
||||
var field = "<input name='" + quizFieldName + "' id='" + quizIdentifier + "' type='";
|
||||
field += match[1] === '(' ? "radio" : "checkbox";
|
||||
field += match[2] === 'x' ? "' checked/>" : "'/>";
|
||||
var splittedText = text.split(fieldRegex);
|
||||
|
||||
Reference in New Issue
Block a user