Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7672729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:21:13+00:00 2026-05-31T16:21:13+00:00

extjs context menu is showing up occaisionally in the wrong place. Top left of

  • 0

extjs context menu is showing up occaisionally in the wrong place. Top left of screen, sometimes all the way left-middle. A lot of times it shows up fine, but it’s showing up in the wrong place enough that it’s annoying.

here is the start to my menu code:

grid<?php echo $count; ?>.contextMenu = new Ext.menu.Menu({
id: 'gridCtxMenu<?php echo $count; ?>',
items: [ ...

Here is where i’m attaching the showAt to the menu button “#actions_button;

var action_button = 'actions_button' + <?php echo $count; ?>;

Ext.fly(action_button).on('click', function() {
    var xy = this.getXY();
    xy[1] += this.getHeight();
    grid<?php echo $count; ?>.contextMenu.showAt(xy);

});

Using extjs 3.2, any help is appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:21:14+00:00Added an answer on May 31, 2026 at 4:21 pm

    It may be necessary to see the whole code in order to properly analyze the problem.

    One possible cause is that Ext.fly writes to a singleton. That is, at the time the ‘click’ handler is run, the flyweight object points to a different DOM node, not action_button. This means in turn that this.getXY() returns crap.

    http://extjs.cachefly.net/ext-3.2.1/docs/?class=Ext#Ext-fly
    …the dom node can be overwritten by other code. … Use this to make one-time references to DOM elements which are not going to be accessed again either by application code, or by Ext’s classes.

    Use Ext.get(action_button) or Ext.fly(action_button, 'MYNAMESPACE') instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ExtJs 3.2.2. I wrote a custom context menu to handle a grid's
I would like to know how to put an Extjs Context Menu (Right Click)
I have created a Layout using ExtJs. It consists of a left menu and
I have an ExtJS xtemplate that is throwing errors because of the way a
Is there any way to use ExtJs.Net in visual studio 2010 at design time
I have an ExtJS window, with a toolbar at the top, and loads with
What is the proper way to close an ExtJS tab programmatically? I need to
I was able to create a tree view [using EXTJS 4 ] with context
Context: I'm writing an ExtJS application to help volunteers manage a camp database. Containing
ExtJS has Ext.each() function, but is there a map() also hidden somewhere? I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.