tracker issue : CF-4204034

select a category, or use search below
(searches all categories and all time range)
Title:

CFLAYOUT Tabs not posting within tab after hotfix 8 loaded

| View in Tracker

Status/Resolution/Reason: Closed/Deferred/Duplicate

Reporter/Name(from Bugbase): Eric R. / ()

Created: 02/19/2019

Components: Language, Page Processing Tags

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: hf-2016-00008-313934 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 1

Problem Description:  After loading hotfix 8, my cfforms that exist within a tabbed layout will no longer post within the tab.  This only affects Internet Explorer, Chrome works correctly.  Rolled back to hotfix 7 and the error goes away.  The actual error trapped in IE is in cfajax.js, line 235:

if(_68.id&&_68.id.startsWith("cf_textarea")){

the error is that "Object doesn't support property or method 'startsWith'"

Steps to Reproduce:

temp.cfm:

<cflayout type="tab" name="userLayout">
	<cflayoutarea name="tab_user" title="test">
		<cfform name="tempForm" method="post" action="temp2.cfm">
			<cfinput type="text" name="field1">
			<cfinput type="submit" name="submitButton">
		</cfform>
	</cflayoutarea>			
 </cflayout>

temp2.cfm:
<cfdump var="#form#">

Actual Result:
form dump is displayed, but in blank window
Expected Result:
form dump is displayed, but inside of "tab_user" tab
Any Workarounds:
Use Chrome or roll back to hotfix 7

Attachments:

Comments:

I should have mentioned that this is a problem in Internet Explorer 11. As a workaround, I reverted the \scripts\ajax\package\cfajax.js file to the hotfix 7 version and it worked. I'm guessing I could comment out the if{} block in the hotfix 8 file that calls .startsWith() and that would fix it. Not sure what other impacts that might have though.
Comment by Eric R.
30349 | February 20, 2019 01:46:26 PM GMT
+1 - Please fix!
Vote by Aaron N.
30359 | February 21, 2019 07:45:39 AM GMT
Hi Eric and Aaron, IE 11 is not supporting startsWith() method. Infact Chrome,Mozilla,Safari and Opera provide browser support for the same. As a workaround goto <cfusion_home>\wwwroot\cf_scripts\scripts\ajax\package\ and add the below snippet to cfajax.js if (!String.prototype.startsWith) { Object.defineProperty(String.prototype, 'startsWith', { value: function(search, pos) { pos = !pos || pos < 0 ? 0 : +pos; return this.substring(pos, pos + search.length) === search; } }); } Note: Closing this as duplicate of bug CF-4204031 Thanks, Manas
Comment by Manas M.
30357 | February 21, 2019 09:04:41 AM GMT
Hi Manas, Wow, thank you very much for the fast workaround! Thanks!, -Aaron
Comment by Aaron N.
30358 | February 21, 2019 09:25:41 AM GMT
Could we get this code block added to the official codebase? After loading hotfix 9 and 10, I had to go in and manually add this line back. Surely CF isn't taking the stance of not supporting IE 11?
Comment by Eric R.
30505 | March 14, 2019 01:00:53 PM GMT
Can anyone provide some insight as to where exactly the code above should be added into the cfajax.js file? What line number should it be added to? Is there any existing code in the cfajax.js file that needs to be commented out in order to get this to work?
Comment by Christopher R.
30809 | May 22, 2019 06:41:48 PM GMT
Literally at the very end of the file. No other code needs to be changed. Just append the code above to the file.
Comment by Eric R.
30813 | May 23, 2019 12:31:05 PM GMT