Closed Bug 1532790 Opened 5 years ago Closed 5 years ago

Custom Element editable menulist doesn't accept selection of dropdown items

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 67.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file)

The menulist was accepting the dropdown item, but not updating to reflect its new value.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9049104 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9049104 [details] [diff] [review]
1532790-menulist-test-1.diff

Review of attachment 9049104 [details] [diff] [review]:
-----------------------------------------------------------------

r=mkmelin with the below explained or fixed

::: mail/base/content/mailWidgets.js
@@ +510,5 @@
> +        event.stopPropagation();
> +        this.selectedItem = null;
> +        this.setAttribute("value", this._inputField.value);
> +        this.dispatchEvent(new CustomEvent("change", { bubbles: true }));
> +      };

why first stopPropagation just to dispatch the same event again?
Attachment #9049104 - Flags: review?(mkmelin+mozilla) → review+

So that the target of the event is the menulist and not the input field inside it. The internals of a widget should be a black box to anything outside it. It isn't in a lot of cases, but it should be.

Ah right, perhaps add a comment in the code

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/de90669821c5
Fix editable menulist to accept selection of dropdown items; r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 67.0
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/2abcf2279b72
Add missing getter to match overloaded setter; rs=bustage-fix DONTBUILD
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/53e9bb2729c2
Skip test on Mac where it will never pass; rs=bustage-fix

Gah, this broke date/time pickers!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: