inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 10, 2015 22:10:28 GMT -8
check that in chrome pasteulo That is what I checked in. That only works on the reply function. However I didn't test it with your plugin enabled. Also $(document ).bind( "submit", function() { }) does the same thing
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 10, 2015 22:30:55 GMT -8
yeah i dont remember why we had to resort to other methods before. submit wasnt working somewhere... it would submit before making changes Chris do you remember why?
|
|
Former Member
inherit
guest@proboards.com
111631
0
May 19, 2024 14:05:08 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Apr 10, 2015 23:08:57 GMT -8
love this plug in
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Apr 11, 2015 7:52:56 GMT -8
yeah i dont remember why we had to resort to other methods before. submit wasnt working somewhere... it would submit before making changes Chris do you remember why? I can't remember either, but I do know that submit was not working when this code was first updated to work on V5. I have changed it to .bind('submit',...) and it appears to be working in all browsers. I don't and won't use Chrome, but it works in Iron, so I'll submit it to the library and hopefully that will fix any decoy button issues.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Apr 11, 2015 7:56:36 GMT -8
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 11, 2015 9:39:01 GMT -8
yeah i dont remember why we had to resort to other methods before. submit wasnt working somewhere... it would submit before making changes Chris do you remember why? I can't remember either, but I do know that submit was not working when this code was first updated to work on V5. I have changed it to .bind('submit',...) and it appears to be working in all browsers. I don't and won't use Chrome, but it works in Iron, so I'll submit it to the library and hopefully that will fix any decoy button issues. It was probably a browser related issue like for chrome. But it seems to work on chrome so kudos to me for re-evaluating the situation.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 11, 2015 16:28:55 GMT -8
I can't remember either, but I do know that submit was not working when this code was first updated to work on V5. I have changed it to .bind('submit',...) and it appears to be working in all browsers. I don't and won't use Chrome, but it works in Iron, so I'll submit it to the library and hopefully that will fix any decoy button issues. It was probably a browser related issue like for chrome. But it seems to work on chrome so kudos to me for re-evaluating the situation. Yes good work.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Apr 11, 2015 16:45:41 GMT -8
I can't remember either, but I do know that submit was not working when this code was first updated to work on V5. I have changed it to .bind('submit',...) and it appears to be working in all browsers. I don't and won't use Chrome, but it works in Iron, so I'll submit it to the library and hopefully that will fix any decoy button issues. It was probably a browser related issue like for chrome. But it seems to work on chrome so kudos to me for re-evaluating the situation. Yes.. I'd not have retried it had you not mentioned it.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 11, 2015 16:59:15 GMT -8
No wait I remember why. Its because you cant set a key AND submit a form at the same time. so if you have a onsubmit handler, and you try to set a key value, the form would submit and change the URL before the AJAX was finished and cancel it. in Chrome, it was fixed for a while by doing a async flag. but then they "fixed" chrome so that no longer worked. I ended up doing the decoy buttons that would continue the click AFTER the key set was complete. that way I could also daisy chain other decoy buttons in if they were present.
If you are just manipulating the textarea, then on submitwas sufficient
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Apr 11, 2015 17:18:46 GMT -8
Was that it? Well, all seems good now.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 11, 2015 17:29:51 GMT -8
Hashtag doesnt set a key, but hashcloud does.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Apr 11, 2015 21:22:13 GMT -8
Hashtag doesnt set a key, but hashcloud does. couldn't you create an api that goes through your decoy button? Like a function for developers like todge?
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 11, 2015 22:12:12 GMT -8
All the decoy button is, is a cloned submit button that has its own click handler. at the end of the handler it passes the click to the next button, be it another decoy or the original submit button. If another one of my plugins has a decoy button, it also creates a clone and hides all the others. Only the left most decoy shows. I dont really know how I could stack more functions on top of what it already runs in order to fire them off one at a time before passing. Im not Eton or Peter
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Apr 12, 2015 3:01:49 GMT -8
If you're setting a key wouldn't set_on('post_quick_reply'...) work?
|
|
inherit
Official Code Helper
65613
0
1
May 11, 2024 14:19:23 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,883
December 2005
horace
|
Post by Chris on Apr 12, 2015 7:25:42 GMT -8
The various workarounds were before the "set_on" method came out which now piggybacks the "ajax" data on top of the form data so no AJAX request actually occurs. This was especially a problem in Chrome/Safari due to this bug and the problem can still surface on forms that do not have a set_on handler such as the profile form (haven't checked lately though). For the modify content on submit scenario, the form widget adds its own submission handler so it can check for and alert user to things such as "no subject", "no message", etc. When that occurs it cancels submission and your handler never gets called on the second go round. That situation might have been improved through pushes and browser updates since then but I once again have not checked. I used to use the validation event to hook in but a trick I think I got from looking at Virgil Sovereign's coding is to hook into the beforeSubmit event of the form widget $('.form_post_quick_reply').form('option','beforeSubmit') Save a reference to that function then replace it with your own function and call the reference function from within your own function to pay it forward, that way you get a bite of the apple every time.
|
|