PDA

View Full Version : creeping context menu



pm100
28 Dec 2011, 5:54 PM
Each time I display a context menu (via right click in my case) the popup menu creeps down the screen. Its shadow displays in the correct place but the menu itself gets further and further down the screen

slemmon
29 Dec 2011, 8:17 AM
What browser are you seeing that in? And is the context menu an Ext.menu.Menu?

pm100
29 Dec 2011, 9:33 AM
IE9 and chrome

yes, Ext.menu.Menu

slemmon
29 Dec 2011, 10:34 AM
I see. I'm not seeing the creep anomaly, but I am seeing the menu detached from the shadow. The shadow is positioned correctly and the menu is down below it.

Interestingly, when I run the same script below in by filesystem I'm good - no issues in FF9, IE9, or Chrome16. But when I publish and test from my second computer off of the web server in IE8 or FF5 is when I see the disembodied menu issue. I'm posting my test case below and a screenshot.

*maybe it's fixed already after be Beta cutoff? See this post for reference: http://www.sencha.com/forum/showthread.php?165467-4.1-Beta-1-Grid-to-Grid-drag-drop-shadow-error

But, if not, and you're seeing something different you might post your test case as well.




Ext.onReady(function () {
var menu = Ext.widget('menu', {
items: [{
text: 'menu item 1'
}, {
text: 'menu item 2'
}]
})

Ext.widget('grid', {
width: 200
, height: 200
, renderTo: Ext.getBody()
, columns: [{
header: 'one'
, dataIndex: 'one'
}, {
header: 'two'
, dataIndex: 'two'
}]
, store: Ext.create('Ext.data.Store', {
fields: ['one', 'two']
, data: [{
one: 'first'
, two: 'second'
}, {
one: 'third'
, two: 'fourth'
}]
})
, listeners: {
itemcontextmenu: function (view, record, item, i, e, opt) {
e.preventDefault()
menu.showAt(e.getXY())
}
}
})
})


30367

pm100
29 Dec 2011, 10:35 AM
it is creeping down. Each time you invoke the menu it is a little further down the screen. I dont mean that it moves of its own accord, just that each display is a little lower

Gummy
4 Jan 2012, 1:04 AM
I have a similar problem with the following simple code:



Ext.onReady(function(){
var win=Ext.create('Ext.window.Window',{
title:'Window',
plain:true,
items:[{
xtype:'splitbutton',
text: 'button',
menu: new Ext.menu.Menu({
items: [
{text: 'item1'},
{text: 'item2'},
{text: 'item3'}
]})
}]
});
win.show();
});



If I put the config "plain" to false, the problem disappears.

aupputuri
10 Apr 2013, 9:02 AM
I am also having the same problem too.
This can be reproduced in the kitchen sink demo too..
To reproduce this, resize the page to smaller window so that panels will have scroll bars, and click on menu and scroll the page.

http://docs.sencha.com/ext-js/4-2/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#menu-bottom-buttons
(http://docs.sencha.com/ext-js/4-2/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#menu-bottom-buttons)
Thanks!!

slemmon
10 Apr 2013, 12:55 PM
See:
http://www.sencha.com/forum/showthread.php?260990

shailykamboj
15 Apr 2013, 2:21 PM
I am facing the same issue with 4.2 version and the context menu is placed at the bottom of the screen , any inputs on how it should be resolved ?