Woocommerce Submit Order button not showing blockUI - wordpress

I'm currently having an issue where the Submit/Process Order button is not invoking BlockUI. The button action works fine and processes the order, however there is quite a delay once the button has been clicked. I'm concerned customers may click it a second time.

Related

Events trigger after next click in Google Tag manager preview

My custom event does populate into my GA4 Analytics, but during testing, the events in the GTM preview don't show up until the next click after the triggering event.
Oddly, it seems that after the initial trigger of each event (with the followup click) they appear to
For the follow-up click, I can click anywhere on the page.
The trigger is set to "All Elements" and Firing when the element matches a CSS selector of [data-XXX="XXX"] and the page URL contains a keyword.
I'm concerned that due to the extra click needed I may be losing some non-zero portion of data. My site doesn't get too many of this particular event so every one counts. The event tracks our online reservation and I need it to be accurate in our Google Ads data so our ROI on ad spend is as accurate as possible.
I know there's a trigger on form submit, but the form doesn't actually trigger this way due to JS. And it does work with the "All Elements" trigger I'm just concerned about the extra click before I see it populate in the preview window.
After closer inspection I found that the followup click is not required.
The summary view does not appear to show ALL info for every single click in realtime. Instead if you choose to look into the data for each click as the happen you can see that the events are triggering as intended, but that new events don't always show in the summary view until after the next click registers.
Hopefully, a future GTM update may fix this as it is not intuitive that the summary view would ever not have the most current data.
TLDR: check the view for each click in the GMT preview and don't rely solely on the summary view.

Nothing happens when pressing button in cucumber, capybara test before adding sleep

I have a problem where I have a page with a kind of coupon that should change given several different button presses.
However, in one case, it seems that I am unable to click a specific button without adding a sleep between finding the element and pressing the button.
non working code:
element = page.find("[for='someButton']"])
element.click()
working code:
element = page.find("[for='someButton']"])
sleep 2
element.click()
I am wondering if there is anything I can do to remedy this issue without having to add a sleep, as I fear this makes my test more brittle as well as causing an unnecessary delay
PS.
No errors are being thrown and I did not write the web-application myself. I did however talk to the one who implemented this page and he said that there should not be anything special about this one button and that it should have it's event listener added as soon as the page loads
This could happen if the button is rendered in the DOM before the click event handler is bound. Capybara will be able to find the element as soon as it's in the DOM.
If this is the case, the tests are actually showing you that there is a (minor) bug. A real end user that clicked the button while the page is still loading would see the same result. A cleaner option would be to render the button via JavaScript and bind the click handler at the same time.
If changing the page isn't an option for you, there may still be hope. If there is something else on the page that is rendered by JavaScript in the same iteration of the event loop, you could add something to the test that looks for that before trying to click the button. For example, in the app I work on at my day job, we render an animated spinner GIF on the page when it loads, and then hide in in JavaScript when the page is fully loaded. Our Capybara tests wait for the spinner GIF to be hidden before interacting with the page.

Ajax Page is not post backing for mouse scrolling

I had a page with 3 update panels... based on textbox changes in updatepanel1, updates the modes of other panels before they click the submit button.
The problem is I created onblur events for the textboxes...once there is a postback everything works fine. But there is one worst case scenario where the user changes the textbox and uses the mouse scroll bar and clicks the submit button. In this case (as onblur event never occurs) I could not able to update the second and third update panels.
One solution I thought was, onclicking the submit button, I was trying to check the previous mode but this will not be possible for my case because of the design issues
You could always attach a Javascript event to the scrollbar to trigger the update as well.
Pseudocode:
window.onscroll:
if contents of textbox have changed:
do postback
else
do nothing

how can fire only one click event even the user clicks button 2-3 times at the same time?

I have a add to list button.when user clicks on button the data in text box gets added in listbox.User can not add same data. but the problem is that is user clicks add button 2-3 times with in a seconds the data is getting added 2 times in list. And if user does not clicks on button like this my javascript validation is working fine but it is getting failed on this so fast click events.
Note:data is getting added only two time regardless of no of button clicks in a second.
So how can fire only one click event even the user clicks button 2-3 times at the same time?
In the method that handles the button click disable the button before you do anything else. Just before the method finishes, re-enable the button.

How can controls (buttons) be set in a ModalPopup Extender panel that do NOT close the panel?

Here's the situation.
When a user is editing a given piece of data, they're allowed to add messages/comments. These are stored as child records in a SQL database. Clicking on the Add Message button brings up a panel (pnlMessage) courtesy of the AJAX ModalPopup Extender. This takes some input and, when the "Send Message" button in the panel is clicked (I learned the hard way to NOT make that the 'OkButton' property), the message is stored in the database and an email is sent to the intended recipients. No problem there.
However, I need to be able to allow the user to add new email addresses (so long as they are registered in our database). I have another ModalPopup / panel combo (pnlSearch) that's tied to a button on the previous panel (pnlMessage).
The user is supposed to be able to add an email or click on a search button to populate a list to choose from.
The pop-up panel (pnlSearch) comes up just fine, but clicking the "Lookup" button (which instigates the search and returns a collection of records that the user is supposed to pick from) closes the panel.
Previously, I ran into the problem of having the Button.Click event never firing when I put the Button into the "OkControlID" property (the CancelControlID works fine since I don't want to do anything). Removing the "OkControlID=Button" line allowed it to work perfectly with the Button.Click event firing as expected.
So now I have the Search panel with a button for "OK" and a button for "Search" - but the panel should stay up and visible after the Search.Click does it's thing. Am I missing some property that basically says "don't close the panel when this button is clicked"? Of course, if I bring up the panel again in the same session, the results from the previous effort are there (the search results).
I'm trying to avoid having to go to javascript as there isn't much, if any, of that experience available to support this.
Help!
Thanks in advance.
You can put the Search panel and the Search button inside of an UpdatePanel. Anything inside of the UpdatePanel will be able to post back without closing the popup. Be sure not to put the buttton that is supposed to close the popup inside of the UpdatePanel.

Resources