A hidden attribute vs display none mismatch kept subscription buttons visible after payment
The subscription controls stayed visible after payment
On September 23, 2026, a subscription interface was still showing its subscription buttons to someone with an active $4 monthly subscription. The implementation was supposed to hide those controls once the subscription became active. It set the container’s hidden property to true, and that assignment had taken effect.
The visible page did not match that state. The controls continued to offer the action of becoming a supporter even though the subscription was already active. The record establishes that this happened to a paying subscriber; it does not establish how many people encountered it.
The relevant JavaScript assignment was short:
plansEl.hidden = true;
Reading that statement suggested that the subscription controls had been removed from view. The browser measurements showed otherwise: plansHiddenAttr was true, plansDisplay was "flex", and subscribeButtonsVisible was true.
Those values put the problem in a specific place. The property assignment was present in the element’s state, but the rendered result still showed the controls. Checking only the JavaScript property would have confirmed the intended state while missing the visible failure.
An earlier icon fix had left the same assumption in place
The subscription controls were not the first element to exhibit this behavior. On September 14, an account icon had remained visible while the user was signed out, despite having hidden applied.
That icon had a class rule setting its display:
.auth-avatar{display:block}
The earlier repair addressed that element individually. It fixed the observed icon problem, but it did not establish a shared rule for other elements using hidden.
On September 23, the same pattern appeared in the subscription interface. This time, the class supplying the display value belonged to the subscription controls:
.supporter-plans { display: flex; ... }
The excerpt records the relevant declaration; the ellipsis represents other styling omitted from the record. The significant part was display: flex.
The two incidents shared an assumption: once an element’s hidden property was true, its class styling would no longer make it appear. The account icon demonstrated that this assumption could fail with display: block. The subscription controls demonstrated the same failure with display: flex.
That sequence explains why another element-specific fix was insufficient as the repair strategy. A local correction had already been made, and a different element later reproduced the problem. The evidence supported moving the visibility rule to a shared selector.
The attribute was set, but the class supplied the display value
The cause was the interaction between the browser’s default handling of hidden and the page’s own CSS.
In this case, the browser’s default style used display: none to implement the hidden state. The authored class rule supplied a display value that took precedence over that default. As a result, the element could carry the hidden state while its computed display remained flex.
The reference material included with the incident supports that explanation. MDN’s documentation for the hidden attribute describes how changing an element’s CSS display value can override its hidden state. The WHATWG HTML standard likewise explains that implementing the state through CSS makes a CSS override possible.
This matters for interpreting the JavaScript. The assignment did not need to fail for the interface to remain visible. The measured true value showed that the intended property state had been reached. The incorrect assumption was that reaching that state necessarily established the expected display result under the page’s stylesheet.
The investigation also checked another site for the same pattern. There, the .ghost class did not specify display, and hidden worked in the measured case. That comparison kept the finding specific: the recorded problem involved class declarations that supplied a conflicting display value. The presence of a class alone was not the explanation.
The useful distinction was between the state requested by the application and the display value resolved by the browser. Both needed inspection.
A shared rule made the hidden state control display
The repair was a single shared CSS rule placed at the beginning of the stylesheet:
[hidden] { display: none !important; }
It replaced the approach of adding separate X[hidden] rules for individual elements or screens. The selector applied the same display requirement to elements carrying hidden, while !important made the intended hiding behavior take precedence over the class display declarations involved in these incidents.
Placement and verification were recorded separately. The rule was added at the beginning of the stylesheet, and a live check on October 20 confirmed it on line 3 of the published styles.css.
More importantly, the browser was measured again after the correction. The same subscription element now had display: "none", and the buttons were not visible. That result verified the repair against the symptom that had prompted the investigation.
The before-and-after comparison did not depend on whether the code looked plausible. Before the repair, the hidden property was true while the computed display was flex. After the repair, the computed display was none and the controls were invisible.
The shared rule addressed the repeated relationship between hidden and class-level display styling. The evidence for choosing it was concrete: fixing the account icon individually had left another element able to encounter the same conflict.
The status date exposed a separate presentation mistake
The same investigation also found a date that should not have been presented as the subscription’s period end.
The status line displayed supporterUntil. That value included an internal three-day allowance intended to absorb webhook delays. It therefore represented something different from the period-ending date shown on the billing card.
The measured discrepancy was October 17 versus October 14. The status line’s date included the allowance, while the billing card showed the subscription period end.
The correction was to display current_period_end as the user-facing date. The internal allowance had a purpose in handling delayed webhook updates, but that purpose did not make its resulting value the appropriate date to show as the billing period’s end.
This was a separate mistake from the CSS conflict. The record does not identify the hidden attribute as its cause. What connected the findings was the need to inspect what the interface actually presented: an internal state or value could be valid for its own purpose while still producing the wrong user-facing result.
For the controls, a true hidden property did not establish that they had disappeared. For the status line, an internal allowance date did not establish the end of the paid period.
Verify the rendered result alongside the requested state
The repeatable lesson is to inspect the browser’s resolved state when checking a visibility change. The investigation used this expression:
{ hiddenAttr: el.hidden, display: getComputedStyle(el).display, visible: el.offsetParent !== null }
It puts the property, computed display, and the visibility check used in this incident next to one another. That made the contradiction explicit: the element was marked hidden, yet its computed display and visibility check still indicated the observed problem.
Use the expression on the element whose visibility is supposed to change. Read hiddenAttr together with display, then inspect the class declarations involved. In the recorded failure, hiddenAttr was true and display was flex; those values directed attention to the stylesheet instead of the property assignment.
After applying a correction, repeat the measurement on the same element. The meaningful verification here was the transition to display: "none" together with invisible subscription buttons.
A screenshot alone had not made this mismatch easy to catch. Reading the computed value supplied evidence that the intended state and the rendered result disagreed. Checking both sides of that relationship turned a seemingly completed hide operation into a reproducible CSS problem—and provided a concrete way to confirm the fix.
Root Cause is written while shipping small software products — you can see them at TechAthletes.