Closed Bug 922535 Opened 11 years ago Closed 10 years ago

[Gaia][Settings][Wifi] Wifi enable button will be disabled on rapid tap while hotspot is enabled.

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: chucklee, Assigned: chucklee)

References

Details

Attachments

(1 file)

STR 1. Make sure wifi and hotspot are both disabled. 2. Enable hotspot. 3. Rapidly tap on wifi enable checkbox. Expected result - Wifi enable button is ready for next tap. Actual result - Wifi enable button is disabled. The cause might be the user taps on the button while it going from enable to disable: 1. User tap on wifi enable button to enable wifi. 2. Gaia disables the button. 3. Gecko deny to enable wifi and trigger |WifiManager.ondisabled|. 4. Gaia enables the checkbox in |WifiManager.ondisabled| [1]. 5. User tap on wifi enable checkbox while it's going from enable to disable. This will try to set wifi to disable. 6. Gaia disables the button. 7. Gecko ignore the request because wifi is already disabled. Wifi enable button is disabled in step 6, but gecko won't trigger event in step 7, this results the button being disabled forever. [1] http://git.mozilla.org/?p=releases/gaia.git;a=blob;f=apps/settings/js/wifi.js;h=e26d6ec4f2e5211f94341cf18ebff160382681ee;hb=HEAD#l96
When receiving wifi enable/disable event [1], only enable wifi checkbox only when |gWifiManager.enabled === lastMozSettingValue |(indicating command success), or the button shouldn't be enabled because it has to do another transition due to request fail. On the other hand, when changing wifi checkbox status [2], |gWifiManager.enabled === lastMozSettingValue| indicates changing to its original state, which can only be triggered when command failed. So we also have to enable the checkbox under such condition. [1] http://git.mozilla.org/?p=releases/gaia.git;a=blob;f=apps/settings/js/wifi.js;h=e26d6ec4f2e5211f94341cf18ebff160382681ee;hb=HEAD#l87 [2] http://git.mozilla.org/?p=releases/gaia.git;a=blob;f=apps/settings/js/wifi.js;h=e26d6ec4f2e5211f94341cf18ebff160382681ee;hb=HEAD#l800
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: