Skip to content

Commit

Permalink
fix(Timetable): fix bad tooltip attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Oct 12, 2023
1 parent b8a3816 commit 8cfc340
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
tooltip = stop_tooltip(trip_schedule, track_change)
full_trip_message = @trip_messages[{schedule.trip.name}]
trip_message = @trip_messages[{schedule.trip.name, stop.id}]
tooltip_attrs = [html: true, toggle: "tooltip"]
tooltip_attrs = [html: "true", toggle: "tooltip"]
%>
<%= content_tag :td, [
class: "js-tt-cell m-timetable__cell" <> cell_flag_class(trip_schedule) <> cell_via_class(trip_message),
Expand Down

1 comment on commit 8cfc340

@thecristen
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what fixed the tooltip JS error. Before we upgraded Phoenix, this produced data-html="true" in the resulting HTML. After the upgrade this was merely producing data-html, with no value. This fix brings it back to rendering data-html="true".

I actually did figure out where this changed - in the phoenix_html dependency version 3.3. From the CHANGELOG:

Fix a bug where nil/false/true attributes in aria/data/phx would emit empty or literal values, such as "true" and "false". This release aligns them with all other attributes so both nil and false emit nothing. true emits the attribute with no value.

Please sign in to comment.