Skip to content

Commit c465c5a

Browse files
authored
Merge pull request #1136 from isaacphysics/hotfix/inequality-tooltip-exception
Fix Inequality 'reading 0' exception
2 parents 63f7ff2 + 625f105 commit c465c5a

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/app/components/content/IsaacSymbolicChemistryQuestion.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ const IsaacSymbolicChemistryQuestion = ({doc, questionId, readonly}: IsaacQuesti
233233
<Button type="button" className="eqn-editor-help" id={helpTooltipId} tag="a" href="/solving_problems#symbolic_text">?</Button>,
234234
<span id={helpTooltipId} className="icon-help-q my-auto"/>
235235
)}
236-
{doc.isNuclear
236+
{!modalVisible ?
237+
(doc.isNuclear
237238
? <UncontrolledTooltip className="spaced-tooltip" placement="top" autohide={false} target={helpTooltipId}>
238239
Here are some examples of expressions you can type:<br />
239240
{"^{238}_{92}U -> ^{4}_{2}\\alphaparticle + _{90}^{234}Th"}<br />
@@ -248,7 +249,9 @@ const IsaacSymbolicChemistryQuestion = ({doc, questionId, readonly}: IsaacQuesti
248249
CH3(CH2)3CH3<br />
249250
{"NaCl(aq) -> Na^{+}(aq) + Cl^{-}(aq)"}<br />
250251
As you type, the box above will preview the result.
251-
</UncontrolledTooltip>}
252+
</UncontrolledTooltip>
253+
)
254+
: null}
252255
</>
253256
</InputGroup>
254257
<QuestionInputValidation userInput={textInput} validator={symbolicInputValidator} />

src/app/components/content/IsaacSymbolicLogicQuestion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ const IsaacSymbolicLogicQuestion = ({doc, questionId, readonly}: IsaacQuestionPr
233233
<Button type="button" className={classNames("eqn-editor-help", {"py-0": isAda})} id={helpTooltipId}>?</Button>,
234234
<span id={helpTooltipId} className="icon-help-q my-auto"/>
235235
)}
236-
<UncontrolledTooltip placement="top" autohide={false} target={helpTooltipId}>
236+
{!modalVisible && <UncontrolledTooltip placement="top" autohide={false} target={helpTooltipId}>
237237
Here are some examples of expressions you can type:<br />
238238
<br />
239239
A AND (B XOR NOT C)<br />
240240
A &amp; (B ^ !C)<br />
241241
T &amp; ~(F + A)<br />
242242
1 . ~(0 + A)<br />
243243
As you type, the box above will preview the result.
244-
</UncontrolledTooltip>
244+
</UncontrolledTooltip>}
245245
</>
246246
</InputGroup>
247247
<QuestionInputValidation userInput={textInput} validator={symbolicLogicInputValidator} />

src/app/components/content/IsaacSymbolicQuestion.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ const IsaacSymbolicQuestion = ({doc, questionId, readonly}: IsaacQuestionProps<I
240240
placeholder="Type your formula here"/>
241241
<>
242242
{siteSpecific(
243-
<RS.Button type="button" className={classNames("eqn-editor-help", {"py-0": isAda})} id={helpTooltipId} tag="a" href="/solving_problems#symbolic_text">?</RS.Button>,
243+
<RS.Button type="button" className="eqn-editor-help" id={helpTooltipId} tag="a" href="/solving_problems#symbolic_text">?</RS.Button>,
244244
<span id={helpTooltipId} className="icon-help-q my-auto"/>
245245
)}
246-
<RS.UncontrolledTooltip placement="top" autohide={false} target={helpTooltipId}>
246+
{!modalVisible && <RS.UncontrolledTooltip placement="top" autohide={false} target={helpTooltipId}>
247247
Here are some examples of expressions you can type:<br />
248248
<br />
249249
a*x^2 + b x + c<br />
@@ -252,7 +252,7 @@ const IsaacSymbolicQuestion = ({doc, questionId, readonly}: IsaacQuestionProps<I
252252
log(x_a, 2) == log(x_a) / log(2)<br />
253253
<br />
254254
As you type, the box below will preview the result.
255-
</RS.UncontrolledTooltip>
255+
</RS.UncontrolledTooltip>}
256256
</>
257257
</RS.InputGroup>
258258
<QuestionInputValidation userInput={textInput} validator={symbolicInputValidator} />

0 commit comments

Comments
 (0)