Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13136 closed defect (fixed)

Incorrect comparison test for djconfig mblHideAddressBarWait in mobile common.js

Reported by: lee Owned by: ykami
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.6.1
Keywords: tabbar delay on resize Cc:
Blocked By: Blocking:


Using dojox/mobile/tests/test_BlackBerry-ScrollableView?.html

Resize your browser (unmaximise/minimise or mobile orientationchange/resize). The tabbar will not reposition/resize for 2 seconds.

The default is 2 seconds

Adding mblHideAddressBarWait:1 to djConfig is set to 1 ms
Adding mblHideAddressBarWait:'0' to djConfig is set to 0 ms
Adding mblHideAddressBarWait:0 to djConfig defaults to 2 seconds.


dm.hideAddressBarWait = dojo.config["mblHideAddressBarWait"] || 2000; // [ms]

in: dojox/mobile/common.js be changed to a non falsey test as the above will always be 2 seconds unless the config is set and set to a positive number

Change History (6)

comment:1 in reply to:  description Changed 8 years ago by lee

the above will always be 2 seconds unless the config is set and set to a positive (non zero) number or a string equivalent.

comment:2 Changed 8 years ago by ykami

Can you clarify a little more for me? I don't understand your problem. Exactly what change are you expecting?

As you may know, orientation-change takes time, and resize has to be performed after the orientation-change has finished. In the earlier revisions, the default value had been 1 second. In most cases, that was fine, but sometimes the orientation-change took more than 1 second and failed to render correctly, which was reported as a bug. If only there were some way to detect the end of the orientation-change..

comment:3 Changed 8 years ago by lee

Sorry if I wasn't clear...

I wanted to stop the delay of the addressbar as it looked terrible on iphone/android. The resize event was delayed which meant if using a FIXED BOTTOM, the tabbar would wait 2 secs till it repositioned itself back to the bottom of the view. I wanted the tabbar to automatically stay fixed to the bottom when changing orientation, otherwise a horrible 'jump' happens after the 2 secs.

I added mblHideAddressBarWait=0 to dojo config. However the code highlighted above is incorrect and always evaluates falsey if a NUMBER 0 is used. If using a STRING '0' the code would evaluate correctly, the same applies for a positive NUMBER.

Is it expected that a STRING has to be used in dojo config?

Is it an expectation there should always be an arbitrary delay of 2 secs in order to let the orientation-change event complete or is it down to user testing to determine whats acceptable?

comment:4 Changed 8 years ago by ykami

Resolution: fixed
Status: newclosed

(In [25420]) Fixes #13136 !strict Allow hideAddressBarWait to be zero.

comment:5 Changed 8 years ago by ykami

Thank you for the clarification. I didn't think anyone would want to specify 0, but I fixed as you suggested, and now you can specify 0. But I am pretty sure specifying 0 will cause a problem in some cases.

comment:6 Changed 8 years ago by bill

Milestone: tbd1.7
Note: See TracTickets for help on using tickets.