Closed Bug 1524893 Opened 5 years ago Closed 5 years ago

Wrong behaviour of <details> <summary>

Categories

(Core :: DOM: Core & HTML, defect, P3)

65 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: matthias.miguelkoehler, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

I created an example here: https://stackoverflow.com/questions/53353524/handle-details-tag-and-checkbox-click-event-with-firefox

Click on a child button element of <summary>

Actual results:

<summary> of <details> showed expanded content.

Expected results:

<summary> of <details> shouldnt show expanded content.

Component: Untriaged → DOM: Events
Product: Firefox → Core
Component: DOM: Events → DOM: Core & HTML
Priority: -- → P3

Ting-Yu might recall something about details/summary :)

I can fix this one.

Emilio, thanks for the tip :)

Assignee: nobody → aethanyc
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

When nsGenericHTMLElement::IsInteractiveHTMLContent() was introduced,
HTMLDetailsElement didn't exist yet. It's better to override
IsInteractiveHTMLContent() for HTMLDetailsElement than check the details
tag in its parent class.

Depends on D18791

Attachment #9041692 - Attachment description: Bug 1524893 - Do not toggle <details> when clicking on an interactive html content in <summary>. → Bug 1524893 - Prevent Label and Summary elements from handling click event if clicking on interactive html content.
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a2336e360977
Prevent Label and Summary elements from handling click event if clicking on interactive html content. r=smaug
https://hg.mozilla.org/integration/autoland/rev/4d0958fba8db
Override IsInteractiveHTMLContent() for HTMLDetailsElement. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: