Closed Bug 1218397 Opened 6 years ago Closed 6 years ago

Calling element.scrollIntoView moves app out of the screen in b2g-desktop

Categories

(Core :: Panning and Zooming, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 796422

People

(Reporter: martianwars, Unassigned)

Details

Attachments

(1 file)

While writing integration tests with Marionette, I needed to click on the individual messages in edit mode (to check / uncheck them). As the messages were partially hidden by the edit mode header. After some basic setup we entered the edit mode using the following :- 

> conversationView.showOptions();
> conversationView.menuAccessors.selectAppMenuOption('Select Messages');

The next step was to select a message which we attempted using the following :- 

> conversationView.tapOnMessage(conversationView.messages[0].id);
where we defined the following in view.js :- 
> tapOnMessage: function(messageId) {
>   var messageNode = this.messageAccessors.find(messageId);
>   messageNode.scriptWith(function(node) {
>     node.scrollIntoView();
>   });
>   messageNode.tap();
> },

This hack moves the application out of the screen in the b2g desktop. What could be a possible reason? What would be the correct approach? I have attached a photograph of the same. Leaving it as a comment in the code now.
Flags: needinfo?(felash)
Flags: needinfo?(azasypkin)
I can repro this in simulator as well, just calling "scrollIntoView" on first conversation node in Inbox or any item on the Homescreen - so moving to Simulator component.
Component: Gaia::SMS → Simulator
Flags: needinfo?(felash)
Flags: needinfo?(azasypkin)
Component: Simulator → Panning and Zooming
Product: Firefox OS → Core
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 796422
This seems to work properly for me on gecko from October 19th on Flame.
AFAIK scrollIntoView works fine on a device, it's just broken on b2g desktop. Speaking of which, I thought B2G desktop was decommissioned?
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #4)
> AFAIK scrollIntoView works fine on a device, it's just broken on b2g
> desktop. Speaking of which, I thought B2G desktop was decommissioned?

Hmm, yeah it should be... Honestly I'm a bit confused, as per [1] we should use Mulet for integration tests on Treeherder, but while running them locally I see something that looks like b2g-desktop instead, buuuut per bug 1191868 it can be just Simulator based on Mulet :)

Aus, can we use Mulet for running integration tests locally, or it's already Mulet that looks like b2g-desktop? :)

[1] https://groups.google.com/d/msg/mozilla.dev.gaia/7OLMu487Dno/IC2wZAuqFwAJ
Flags: needinfo?(aus)
I'm quite sure we use Mulet already :) We download mulet using the "mulet" Makefile goal (which installs in the directory 'firefox/').
But I'm not sure Mulet is OOP, so we likely have the same issue in Mulet than what we used to have in B2G.
(In reply to Julien Wajsberg [:julienw] from comment #7)
> But I'm not sure Mulet is OOP, so we likely have the same issue in Mulet
> than what we used to have in B2G.

Correct. Mulet is being used. It's not OOP enabled by default but we do run some OOP tests on the build. (But not the Gij tests).
Flags: needinfo?(aus)
You need to log in before you can comment on or make changes to this bug.