I've had a look around to see if this has been answered, and there are many similiar questions here but none that match the problem I'm having, so here goes.
I have a jQuery animation that runs on all pages. It works fine on all pages except those with a .NET Update Panel. The items that are animated are not part of the Update Panel at all, they have nothing to do with it.
When I click on the button that triggers the animation in question, it doesn't do anything. It gets called alright (a quick alert("clicked!"); proved that) but it simply doesn't do anything. It sometimes looks as though it's trying, but failing, but there are no JavaScript errors reported.
From other similiar questions and answers here, people have suggested using jQuery's .live() and also the PageRequestManager.getInstance().add_endRequest() but none of these are valid here, as the items are outside of the Update Panel. (I've also given them a try, just in case!)
Has anyone else come across this issue before? Any help appreciated!
A quick edit...it appears that clicking the button that causes the animation is actually causing the update panel to reload, am not sure why as they're all set to conditional and have triggers associated with them.
Ok, I've fixed it myself. The jQuery click on the div that caused the animation was being propagated through to the UpdatePanel. Simply calling: event.stopPropagation() in the .click() function solved the problem.
Just an FYI, if you are using events registered with .live() this will not work.
(Per the jQuery documentation: http://api.jquery.com/event.stopPropagation/)
Related
The following question is about RichTexFX. For standard JavaFX components, I've never had this issue before.
In my application, I am adding text content to the end of a GenericStyledArea (actually a subclass of it, but that should have no impact on the behaviour I am observing). Every time new content has been added to the end of the document, I scroll to the bottom so the new content is always in view. I use the following code to scroll to bottom (actually written in Kotlin, but I have translated it to Java below):
showParagraphAtTop(document.getParagraphs().size() - 1)
This almost always works. However, in some cases the screen will not show the newly added element. I have come to the conclusion that by the time showParagraphAtTop is called, some internal state in richtextfx has not been updated. This is because I added a button that I can click on to call the code above, and if I click it after the scroll failed, it scrolls to the bottom as expected.
I have tried various ways to work around this, but the only solution that works reliably is to do the following:
FxTimer.runLater(Duration.ofMillis(10), () -> showParagraphAtTop(getDocument().getParagraphs().size() - 1));
In other words, I force a short delay before actually scrolling the screen.
Even though the above works, it's incredibly unsatisfactory, and there should be some way to do this the right way. However, I have been unable to figure it out.
I saw another question (Autoscroll JavaFX TextFlow) which suggested the use of layout() prior to scrolling. This does not remove the problem, although it does appear to make it less common.
I can't get my code to work to trigger a function upon a click event. Both on desktop or mobile chrome browser it doesn't work. If I enter to inspector mode I recognize that in a small area of the object I can click it and it will triggered, but if I leave the inspector (strg+alt+i) it doesn't work. it seems to me that something will not hit the right point to trigger the event. This makes me crazy.
I hope someone could give me a good hint to solve my problem. thanks in advance.
My code is online testable under https://glitch.com/~ede21-arjslocationtutorial
I did not try to edit the code but I think the problem comes from your cursor and raycaster properties. They should be on a camera entity, not on the a-scene entity. A-Frame creates a default one but you can create it yourself and set this properties. The cursor will change when you hover the entities, then it should work properly ;)
I'm using the FETStationPanels from FlashEff2 with Flex 3. Unfortunately, it is garbling some of the letters.
Below is a simplified version of what the problem is:
Imagine that I've got three buttons. If any of the buttons are selected a titleWindow opens. Inside the titleWindow is some text pulled from a database that has the FETStationPanels effect applied to it, and an image. The first button that is clicked (it doesn't matter which one) will have garbled text. If I select another button, then the effect is fine and everything displays okay.
The FlashEff2 effect is fired on the creationComplete event of the TitleWindow.
I had a resize effect on the TitleWindow. I removed it, because I thought that that might be the problem. I put in a static height for the TitleWindow, but that didn't work either.
I also tried using callLater and setting a timer to delay the appearance of the image until well after the effect had ended, but that didn't work, either.
It's weird that the problem occurs only on the first button selected. After that it works fine.
I've been struggling with this problem for 3 days. I would post code, but there is too much for it to be useful. Does anyone have any suggestions on how to solve this problem? Any general things that I can try or should check?
Thank you.
-Laxmidi
Okay, I figured it out. When I add the TitleWindow, I put some effects on it in the main app and I forgot about them:
popWindow.setStyle("addedEffect", fadeInZoomEffect);
popWindow.setStyle("removedEffect",zoomFadeEffect);
When I took these out, my problem was solved. Everything works. I wish I had noticed those lines a few days ago!
Thank you.
-Laxmidi
I have been developing an application for the past couple of weeks and as of yesterday all of the textinputs have become uneditable. It seems like when you click on one it switches between the focusIn state and then back to the focusOut state. What could cause this?
Sounds like you've added an event listener that causes you to lose focus just when you gain it. Without a look at the code, though, all we can do is guess.
A TabNavigator was causing the problem. By removing the TabNavigator and replacing it with a TabBar and ViewStack it fixed the problem. If you looking at the comments section of this page http://livedocs.adobe.com/flex/3/html/help.html?content=navigators_4.html you will be able to see in more detail what the problem is
I've run into a strange problem with an HTML form. I've built a dynamic table that adds a new row when you enter data into an existing blank row; because there are some server requirements in adding a row, I make an AJAX call to do this in the onblur event. It took a while to make this work for all browsers, but eventually all was happy with the world ... until IE8. Now, what happens is that, when the call returns from AJAX, the cursor shows in the next textbox (correctly), but the keyboard no longer works. I have to close the modal window (actually an IFRAME), then the keyboard starts to work again. If I put IE8 into compatibility mode, it works fine.
Has anybody seen behavior like this, or have any ideas for a workaround?
Thanks, Jim
I had problems with DIVs placed above an INPUT, that cloacked the cursor... and once the DIV was not above it, the cursor appeared back again.
Just an idea: Maybe your IFRAME captured the focus (and/or the keyboard).