All users were logged out of Bugzilla on October 13th, 2018

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

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: yang.zhao, Assigned: yifan)

Tracking

unspecified
x86_64
Linux

Firefox Tracking Flags

(b2g-v1.4 affected)

Details

(Whiteboard: [sprd347462])

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
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.
(Reporter)

Comment 1

4 years ago
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)
(Reporter)

Comment 2

4 years ago
Created attachment 8482534 [details] [diff] [review]
Bug347462_screen_jump_problem.patch

Here is a patch from our RD,it seems works.
(Reporter)

Updated

4 years ago
status-b2g-v1.4: --- → affected
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 4

4 years ago
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.
Flags: needinfo?(ehung)
Attachment #8482534 - Flags: feedback?(yliao)
(Assignee)

Updated

4 years ago
Assignee: nobody → yliao
(Assignee)

Comment 5

4 years ago
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.
(Assignee)

Comment 6

4 years ago
Created attachment 8486248 [details] [review]
pull request
Attachment #8486248 - Flags: review?(21)
(Assignee)

Comment 7

4 years ago
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)
Attachment #8486248 - Flags: review?(21) → review?(crdlc)
Comment on attachment 8486248 [details] [review]
pull request

If it fixes the problem LGTM, thanks
Attachment #8486248 - Flags: review?(crdlc) → review+
(Assignee)

Comment 9

4 years ago
Merged into master
https://github.com/mozilla-b2g/gaia/pull/23839

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