HomePhabricator

Fix craziness in template dialog focusing

Authored by Catrope.

Description

Fix craziness in template dialog focusing

setMode() is called multiple times, but it didn't
check whether the mode being set was already set.
Because it's a setter, make it idempotent.

This fixes the problem where the first input will
be focused first, then blurred later, but it
introduces a new problem because the label for
the 'mode' ActionWidget is set from setMode().
To solve that, factor the setting of this label
out into its own function and call it on setup.

Bug: 73138
Change-Id: I9bb127f22f6c0b745b393c523ec42f320fc85cf3

Details

Committed
CatropeNov 8 2014, 12:41 AM
Parents
rEVEDf7b947f14c17: Merge "Support pre's in tables"
Branches
Unknown
Tags
Unknown
References
refs/changes/97/171997/1
ChangeId
I9bb127f22f6c0b745b393c523ec42f320fc85cf3