Closed Bug 979764 Opened 10 years ago Closed 10 years ago

[keyboard refactor] resizeTo would be invoked more than once when keyboard relaunch

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rudyl, Assigned: rudyl)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #958663 +++

When investigating the original keyboard cold launch issue, I found with the new keyboard (demo-keyboard), it would invoke resizeWindow() more than once, and I think this might make the profiling result not that accurate.

So, I am going to look into this first.
Hi all,

This patch attempt to address the issue that the new keyboard app would invoke window.resizeTo() more than once, which may cause performance issue.

 1. Wait until 'load' event to do app.start(). 
 2. Not to do resizeWindow(), which would do window.resizeTo(), until the app is shown.

With the above 2 checks, we could minimize the window.resizeTo() called only once when the app is re-launched from scratch.

==
Note: after checking, the app would receive "resize" event twice even when the app itself does nothing (remove all the CSS/Js code) and even I started the 'resize' event listener after 'load' event.

Tim, David,

May need your help to take a look and give feedbacks.
Thanks.
Attachment #8388476 - Flags: review?(timdream)
Attachment #8388476 - Flags: feedback?(dflanagan)
Attachment #8388476 - Flags: review?(timdream) → review+
Merged to Gaia master,
https://github.com/mozilla-b2g/gaia/commit/da462713511bf9c573b8bef97a30e64c50680ddf
Assignee: nobody → rlu
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Attachment #8388476 - Flags: feedback?(dflanagan)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: