Click event incorrectly attached after DOM manipulation

I have a page with elements of entry and a span element style as a button. Register event handlers changes on input elements, to make the validation when the input values are changed. If the entries are not valid, I add the content of a div on the page to indicate the problem. I also save a click event handler on the span of style as a button.

When I change an entry and then immediately click the duration (i.e. without leaving the input element before clicking on the duration of the update), I see:

(1) mousedown on the duration
2) switch to entry
(3) mouseup on the entry

This happens only when I change the DOM in the event handler changes on the entry. If I do not change the DOM then I see:

(1) mousedown on the duration
2) switch to entry
(3) mouseup on the duration
4) click on the duration

In the first case, I see the mouseup attached to the input rather than the span element element, even if it has the same coordinates as the mousedown attached to the span element. Given the coordinates are within the span element and outside limits of the input element, I don't understand why mouseup is associated with the element of entry rather than the span element.

There is an example of this at http://jsfiddle.net/4zx8rm7c/.

I see this behavior in Chrome and Firefox 34.0.5 39.0.2171.95 m.

If the association of the mouseup event with the input element, despite the apparently independent of the mouse event, behavior plan, coordinates I need to understand why that is. I looked at characteristics of COM event level-2 (briefly) and I don't see an obvious explanation.

This forum is intended for the user support, not for issues related to web development.
Try announcement Web development / standards evangelism MozillaZine forum. The contributors there are better informed on the problems of development of web page with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You will need to register and log in to post in this forum.

Tags: Firefox

Similar Questions

  • ActionScript error on the menu bar click event after migrating to Flex 4.5.1

    Now that I have converted my app for Flex 4.5.1 one click event of MenuBar throws the following error:

    TypeError: Error #2007: child parameter must be non-null.

    at flash.display::DisplayObjectContainer/getChildIndex()

    at mx.core::Container/getChildIndex() [E:\dev\4.5.1\frameworks\projects\mx\src\mx\core\Contai ner.as:2839]

    to mx.containers::ViewStack / set selectedChild() [E:\dev\4.5.1\frameworks\projects\mx\src\mx\containers\ViewStack.as:639]

    at com.views::publicCanvas/mouseClick() [C:\ColdFusion9\wwwroot\ifq2\src\com\views\publicCanv as.mxml:54]

    at com.views::publicCanvas/__menuBar_click() [C:\ColdFusion9\wwwroot\ifq2\src\com\views\publi cCanvas.mxml:86]

    The throwing function the error is:

    private void mouseClick(event:MouseEvent):void

    {

    var tempMenu:MenuBarItem = MenuBarItem (event.target)

    If (XMLList (tempMenu.data). * () .length == 0)

    {

    publicViewStack.selectedChild = this [(MenuBarItem (event.target).data.@view)];

    }

    }

    The ViewStack is defined as:

    < mx:ViewStack id = "publicViewStack".

    x = '0 '.

    y = "22".

    Width = '100% '.

    height = "564".

    selectedIndex = "0" >

    <! - selectedIndex = 0 - >

    < s:NavigatorContent >

    < views: publicHomeCanvas id = "publicHomeCanvas" / >

    < / s:NavigatorContent >

    <! - selectedIndex = 1 - >

    < s:NavigatorContent >

    < views: viewDealers id = "viewDealers" / >

    < / s:NavigatorContent >

    < / mx:ViewStack >

    Menu data are defined in the file menuDataPublic.as as:

    <? XML version = "1.0" encoding = "UTF-8"? >

    elements <>

    < point position = 'top' label = 'Home' view = "publicHomeCanvas" menuindex = "0" / >

    < point position = 'top' label = "View Dealers" view = "viewDealers" menuindex = "1" / >

    < / object >

    In point 3.6, it worked perfectly.  Under the 4.5.1 it fails as indicated.  Has anyone encountered a similar problem?

    Thanks again!

    Lee

    Well, you made your point of view as children of a NavigatorContent and then try to make the child the selectedChild, not its NavigatorContent container.

  • Click event on mx button in custom class

    Create a class called ComplexSearch and decided to use the button component.
    as far as I can see my code is very well, but I do not receive my trace on the click event.

    If I put the track on the we (click) compontent {} it works very well.
    If I use the method addEventListner as below, but outside my classroom on the time line, it works fine...

    any suggestions?

    have attached the relevant code

    for the record, after hours of frustration, I found the answer.
    Basically, it's because I had the mc on the scene and attached the class in the connection dialog.
    It lies rather than the constructor, I needed a saee onLoad statement below

  • Errors in 'Speed' while accessing the mouse click events?

    Hello

    I built a software where it has a CVI callback function registered on the Panel. The function tests whether two cases, the first EVENT_LEFT_CLICK and then EVENT_LEFT_CLICK_UP. The user is supposed to keep the click button for some time (~ 1 second), and there is no problem. However, I have found that if by mistake (that users commit often) multiple rapid clicks are made, sometimes the click down the piece of event (EVENT_LEFT_CLICK) of the code is not read. I reduced the likelihood of this problem of the speed setting of double click (on Windows) to the maximum.

    I think that if I could eliminate the double click event, this problem would be resolved almost completely and only limited by the speed at which the processor can update mouse events.

    Hope you understand my problem.

    Thank you!!

    AUTOSOLVED.

    Thanks to a guy who posted his own solution on a Windows forum, to 'disable' the double click. Just change the HKEY_CURRENT registry value > ControlPanel > mouse > DoubleClickSpeed to 1. What makes the double click speed so fast that you can access virtually every user actually simple clicks.

    After doing this, in order to apply the registry editing, I ended explorer.exe running and he raised through windows task screen. However, change, this applies to what I opened the mouse Panel (without change or apply anything from there).

  • Trigger, click event on RichLink of Bean managed

    I want to get a click event of a managed bean to a RichLink that has a clientListener of type click.


    To do this, I have tried many options but nothing works.


    My problem is that the RichLink has no action and actionListener property, so I couldn't launch ActionEvent, since there is no.

    I tried a few options:

    //NOT WORKS
    public void option1() {
      RichLink linkF11 = (RichLink) JSFUtils.findComponentInRoot("cil2");
      String script = "var link = AdfPage.PAGE.findComponentByAbsoluteId('"+linkF11.getClientId()+"');" +
                        "link.click();";
      addJavaScript(script;)
    }
    //NOT WORKS
    public void option2() {
      RichLink linkF11 = (RichLink) JSFUtils.findComponentInRoot("cil2");
      String script = "var link = AdfPage.PAGE.findComponentByAbsoluteId('"+linkF11.getClientId()+"');" +
                      "link.queueEvent('click');";
      addJavaScript(script;)
    }
    //NOT WORKS
    public void option3() {
      RichLink linkF11 = (RichLink) JSFUtils.findComponentInRoot("cil2");
      String script = "var link = AdfPage.PAGE.findComponentByAbsoluteId('"+linkF11.getClientId()+"');" +
                      "AdfCustomEvent.queue(link, "tooglePanelSplitter",{}, false);";
      addJavaScript(script;)
    }
    //WORKS -> DOM EVENTS, NOT ADF
    public void option4() {
      RichLink linkF11 = (RichLink) JSFUtils.findComponentInRoot("cil2");
      String script = "var link = document.getElementById('"+linkF11.getClientId()+"');" +
                      "link.click();";
      addJavaScript(script;)
    }
    private void addJavaScript(String script) {
      FacesContext facesContext = FacesContext.getCurrentInstance(); 
      ExtendedRenderKitService service = (ExtendedRenderKitService) Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
      service.addScript(facesContext, script);
    }
    

    Finally, I have found a solution, but I read that we should avoid the standard calling javascript code in the ADF.

    JSF code

    <af:link text="Modo Comp." id="cil2"
      partialSubmit="true" styleClass="icon-list-alt"
      shortDesc="Modo Compatibilidad"
      clientComponent="true">
      <af:clientAttribute name="psId" value="#{myBean.psF11.clientId}"/>
      <af:clientListener method="tooglePanelSplitter" type="click"/>
    </af:link>
    

    JavaScript code

    function tooglePanelSplitter(event) {
        var psId = event.getSource().getProperty('psId');
        comp = AdfPage.PAGE.findComponent(psId);
        if (comp) {
            comp.setProperty("collapsed", !comp.getProperty("collapsed"));
        }  else {
            alert('not found');
        }   
    }
    

    PS: jdeveloper 12 c (12.1.2.0.0)

    I wanted to start the ClientListener to a managed bean, but finally I solved a new managed bean javascript code execution.

    In my first javascript code, I switch the position of a panelSplitter, and in this new code, I put the post to not collapsed.

    //SOLUTION
    public void option4() {
      String psId = ztBean.getPsF11().getClientId();
      String script = "var psl = document.getElementById('"+psId+"');" +
                      "psl.setCollapsed(false);";
      addJavaScript(script);
    }
    private void addJavaScript(String script) {
      FacesContext facesContext = FacesContext.getCurrentInstance();
      ExtendedRenderKitService service = (ExtendedRenderKitService) Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
      service.addScript(facesContext, script);
    }
    
  • Is it possible to set up the click event handler of reflow

    In my view, does not reflow in click events/actions.

    Example: I want to hide a rectangle at the click of a button and show it when you click on another. I want to do it on the same page and not imitate this action by loading another page with hidden rectangle.

    Hi Sujit-

    You are right. Reflow has support for the stationary, active flight and States of implementing at the point, but not clicking. To accomplish what you're looking for, you probably want to add javascript using another tool (Dreamweaver, cleats or one other editor) after you're done with the design of reflow.

    I hope that helps and thanks for the use of reflow.

    VIC

  • reversal, and then click event with swapping of images

    Dear people,

    I am looking for a simple way to solve my problem. I want to have a passage of the mouse and - effect on my bar of navigation, as well as on the click event, it should stay in the mouseover state. So far the mouseout/mouseouthandler() and the click event affect eachother on a wrong track. The example that I have attached here is done with plain rectangles, but later, they will be the images. So I guess that changes in css does not help me.

    I tried to understand some old threads here in the community, but they have reached a level of coding that isn't mine so far.

    MyStatusQuo: http://intern.ixtract.de/_3MFkJRIOOfbNZR

    I hope for your help and thanks in advance!

    It's very easy

    Just put your codes click between If like your mouseover and mouseout/mouseouthandler()

    sample for press 1 > click on

    If (WB! = 1) {}

    Buttons.Reset ();

    sym.getSymbol("btn1").$("back").css ({"background-color": "#ffbb0f"})

    sym.getSymbol("btn1").$("Text").css ({"color": "#000000"})

    sym.getSymbol("btn1").$("Text").html ("Clicked")

    WB = 1;

    }

    Zaxist

  • Difference between a Click event and change

    Not sure what could be the cause, any input would be helpful

    I use the following JAVA script to set the focus on a text box after the user clicks on a checkbox.

    With the help of the "Click" event

    xfa.host.setFocus (form1.requester_info.m_approve. Table9.Row1.m_Name);

    When I click on the box, nothing happens. Focus does not move

    The 'Change' event using I use the same code;

    xfa.host.setFocus (form1.requester_info.m_approve. Table9.Row1.m_Name); He works.

    I have 4 check boxes on the form that will use this code (by changing the accent of course) and I get the same results for each checkbox.

    Anyone got any ideas what I could do for this shit

    Chomp

    Here, just tried and it works very well on both events. I used the version 9 and Acrobat 8. If it works for you then that's great... . If you want to pursue this more then read on...

    The ore which version do you use?

    When you move the code to the click event, you can add an app.alert ("triggered Click event!") to indicate that the event triggered (just like a message to yourself for debugging purposes. If it still does not work check the javascript console by pressing Ctrl - J (assuming you are using Acrobat) and see if there are any error messages, in this case the change and the click event do the same thing.

    Paul

  • Why by clicking on an attached file of MS launched protected Word file and allows you to bypass the password protection?

    Using Thunderbird 24.6.0 Windows 7
    I got a MS Word (docx format) file as an attachment. The file is protected by password with the password that is provided in a separate e-mail.
    To launch the file, I double-clicked on the attachment icon.
    The file opens and displays the full content without prompting for the password.
    (Save the file on my computer and opening it from the word trigger the prompt of password as expected.)

    The whole point of sending files protected by password by e-mail, it's that anyone intercepting the file would not be able to open it without the password. Why Thunderbird bypasses this protection?

    seriously you and you associate should investigate with S/Mime.

    While the cost of commercial certificates, they are free to Comodofor personal use, so learning can be done without cost.

    But if the two of you have a certificate and install it. (you need to digitally sign your mail.) encryption of mail content including attachments are as simple as click on Options menu > encrypt this message when you compose your mail.

    No password, no e-mail with password and attachments in another mail. On your side, you get a guarantee that the message you receive is unchanged since that he showed when he was sent, and anyone who intercepts the message in transit would need to the key that is installed on the computer of the recipient to decode the content, in contrast to the normal plain which is sent text. And you don't notice anything else than a few icons when you read the mail that the decryption is done on the fly.

    Note that email certificates are sent to your browser when you click on a link in an email from the provider must be exported from the browser certificate store and imported into Thunderbird certificate store.

  • By the way a multicolumn Listbox double-click event line in a secondary

    What I have is a shell at a higher level with the configuration of equipment of high level, as well as common application functions as save the test report and exit/close.

    In this first level is a listbox multicolumn "Test selection".

    When a device is selected in the configuration, one of the many sub-panels charge based on the selected device.  When the secondary is loaded, the table of test selection on the front of the top is filled with items via a reference.  The listbox items differ according to high school who is responsible.

    Normally what we do is use a structure of the event with the event double-click to change States in the program.  Given that States I want to change are in the secondary, and the list box lies in the toplevel, I can't use the event structure to integrate this double click on the secondary line.

    What I want to do currently a property to read to the 'value' of this list box in the secondary in both cases the timeout of a structure of the event or within a parallel loop, then to the decision of the State based on the changing value of the indicator.  However, by doing this I lose the effect "queues" in the table of test selection (can double-click some line items and the structure of the event will be queued double click events).

    Is there a more elegant way to spend this line double-clicked in the secondary?

    It seems that you already pass a reference to the Listbox MC control to the Subvi.  You can use it to record dynamically for the double click event inside the Subvi.

  • Double-click event

    Hello

    How to get the double click event. (ex if I click table colume double time as only triger event.)

    Hello

    pls refer this link...

    http://digital.NI.com/public.nsf/allkb/391D522B0FDD4B3F862571E300739F44

  • Contact information for return pixel Imaq image with the mouse click event

    Hello

    I'm trying to get the coordinates in pixels of an image Imaq based on a mouse click event, similar to this post and this post. The problem is that with the first post, I get the coordinates in the image control and hesitate to trust them, they seem to have the Center origin, may return negative coordinates and do not represent the actual size of the detector that I use (512 x 512). It also returns the coordinates outside the actual data when it is clicked on the image control framework. The second method returns simply null coordinates. What I want are the coordinates of the pixel displayed when hovering the mouse imaq image control framework.

    What baffles me, is that I tried the second method with a png stock file and it works fine, it is only when I create an image from the data of my camera than the coordinates are returned null. Note data views of camera under control of image very well.

    Any ideas would be useful. Enclosed is a picture of the offending code and the Panel before displaying the camera data is coming (I know it needs some cleaning).

    Thank you

    Tyler

    for help, please send your vi

    but I think that this example vi is your solution

    check this vi

  • My right click menu is missing after the use of security of Kaspersky application control settings.

    Right click menu disabled

    My right click menu is missing after the use of security of Kaspersky application control settings.

    My right click menu is missing after the use of security of Kaspersky application control settings.

    This tutorial will help?

    Context menu - enable or disable

    http://www.Vistax64.com/tutorials/140508-context-menu-enable-disable.html

    Option One is the easiest.

  • How to create the scroll to the menu icon click event bar

    How to create the scroll to the menu icon click event bar

    (as the "field of scrolling image")

    In my opinion, it is better for you to try something to help implementation of your solution to ask for the code.

    For example, create a few BitmapFields with icons that act as buttons.  There is source for this sort of thing on the forum if you look at, I think, looking FRO Image button, icon or Bitmap button.

    Once you have these buttons work, add these in a HorizontalFieldManager.

    Good luck.

  • Add images to the listfield on the click event

    Hello

    I'm trying to reproduce the "tableview with UITableViewCellAccessoryCheckmark" iPhone, IE, whenevever, I click on a line in the listfield, I want to display a check mark in the same row.

    In the click event, I am not able to get the graphics of the listfield object draw the check mark. Is there another way to do this?

    Any response is appreciated.

    Thank you

    http://www.BlackBerry.com/developers/docs/6.0.0api/NET/rim/device/API/UI/component/ListField.html#GE...

    (using the index you can retrieve the item from the underlying collection)

Maybe you are looking for