Closed Bug 1061446 Opened 10 years ago Closed 10 years ago

[Dolphin][v1.4]Drag and drop an icon to a new page,the phone will always go to the new page automatically

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

(b2g-v1.4 affected)

RESOLVED FIXED
Tracking Status
b2g-v1.4 --- affected

People

(Reporter: yang.zhao, Assigned: yifan)

Details

(Whiteboard: [sprd347462])

Attachments

(3 files)

Attached video VID_20140902_154347.3gp
1.Drag and drop a homescreen icon to a new page,drag it as far at right as you can.
2.Click home button to exit edit mode,then slide to previous page
3.It will go to the new page automatically.

You can see the video for more detail.
Hi,Evelyn
    The attachment 8482529 [details] is the video of reproduce steps, the issue occurs when dragging the third icon.

    The root cause maybe because the code enters an endless loop in dragdrop.js:
      setDisabledCheckingLimits(true)-->checkLimits();-->overIconGrid();-->back to setDisabledCheckingLimits(true)

    Could you help to find someone to check this issue? Thank you!
Flags: needinfo?(ehung)
Here is a patch from our RD,it seems works.
Whiteboard: [sprd347462]
(In reply to yang.zhao from comment #0)
> Created attachment 8482529 [details]
> VID_20140902_154347.3gp
> 
> 1.Drag and drop a homescreen icon to a new page,drag it as far at right as
> you can.
> 2.Click home button to exit edit mode,then slide to previous page
> 3.It will go to the new page automatically.
> 
> You can see the video for more detail.

Yang, this should randomly reproducible, right? I also see this problem in previous builds but not recently.  Once this issue occurs, user can only workaround by moving the icons back.
Comment on attachment 8482534 [details] [diff] [review]
Bug347462_screen_jump_problem.patch

Yi-fan, it seems an interesting issue on *old* homescreen (on v1.4). Would you like to take a look and feedback this patch? Thanks.
Attachment #8482534 - Flags: feedback?(yliao)
Flags: needinfo?(ehung)
Assignee: nobody → yliao
Thank you yang.zhao for pointing out the incorrect loop. By setting CHECK_LIMITS_DELAY to 0 we can reproduce this easily.

The purpose of setDisabledCheckingLimits is to disable checkLimits when homescreen is making transition between pages. This can be traced long back to the 1st commit of the homescreen app in the commit df5f425, at line 591 and line 616 in apps/homescreentef/js/grid.js.

However, setDisabledCheckingLimits (at line 149) is invoked without page transition when the icon is placed at the right screen limit, which is unnecessary and causes the loop. What we need is to move the setDisabledCheckingLimits call to the 'if (pageHelper.getNext())' block. Will submit the code change shortly.
Attached file pull request
Attachment #8486248 - Flags: review?(21)
Comment on attachment 8482534 [details] [diff] [review]
Bug347462_screen_jump_problem.patch

The faulty loop could be prevented by correctly placing the setDisableCheckLimits call. Pull request submitted.
Attachment #8482534 - Flags: feedback?(yliao)
Comment on attachment 8486248 [details] [review]
pull request

If it fixes the problem LGTM, thanks
Attachment #8486248 - Flags: review?(crdlc) → review+
Merged into master
https://github.com/mozilla-b2g/gaia/pull/23839

TBPL
https://tbpl.mozilla.org/?rev=8add4d0b7a2ef35651f78f4be30f25860f773250&tree=Gaia-Try
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: