#16766 closed defect (fixed)
SpinWheelSlot::set("value") can fail when browser zoom is != 100%
Reported by: | Eric Durocher | Owned by: | Eric Durocher |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | DojoX Mobile | Version: | 1.8.3 |
Keywords: | Cc: | cjolif | |
Blocked By: | Blocking: |
Description
To reproduce the problem, save the attached test case to dojox/mobile/tests, launch in Chrome, zoom to 110% (one mouse wheel tick from 100%), reload: the picker should display Jan-1-2020, but it displays the current date instead.
The SpinWheelSlot::spin method assumes integer values for the current scroll position of the slot and tests for multiples of the item height, but when the browser zoom is set to e.g. 110%, the gePos() method can return decimal values, causing the slot to return prematurely at line 333.
Attachments (4)
Change History (12)
Changed 8 years ago by
Attachment: | test_SpinWheelDatPicker-zoom.html added |
---|
Changed 8 years ago by
Attachment: | 16766.patch added |
---|
Round scroll position before testing for multiple of item height, fixes set("value") sometimes failing with browser zoom != 100% - Eric Durocher (IBM, CCLA)
comment:1 Changed 8 years ago by
Cc: | cjolif added |
---|
comment:2 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
comment:3 Changed 8 years ago by
Status: | new → assigned |
---|
comment:5 Changed 8 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Seems there are still cases when this fails -> reopening
Changed 8 years ago by
Attachment: | 16766-new.patch added |
---|
Improved behavior in presence of browser zoom - Adrian Vasiliu (IBM, CCLA)
comment:6 Changed 8 years ago by
I'll be committing this but I don't think deleting the properties make sense in this case. These are properties that will be used regularly during the life of the component we should just set them back & forth to true/false (this allows JavaScript? VMs to optimize the class also to not add/delete fields regularly). I'll do the change myself.
Changed 8 years ago by
Attachment: | patch16766-fix-in-test.patch added |
---|
Fixes in test to ensure it works on any OS lang and also in IE8 - thanks edchat (IBM, CCLA)
Test case for SpinWheelSlot::spin bug with browser zoom != 100%