getElementById fails on very specific ID that is definitively in the DOM tree on IE 11, possibly Edge - why?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








21















In Microsoft IE and (according to comments) Edge, getElementById() on an ID that is exactly "extTabsBodyEleFile1273551781_renderTo" fails.



<!DOCTYPE HTML>
<html>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
</body>
</html>


This ID was automatically generated. Changing the ID in any way fixes the problem. Getting the parent of the div and listing its child nodes also includes the div.



The error could be reproduced on both IE 11.0.9600.19155 and 11.0.9600.18538 - but it worked on another machine with IE 11...19155 without issues.



The error can also be reproduced if you open the developer console on a random site, change the ID of any element in the DOM explorer to the ID above and then try to get that element by document.getElementById('extTabsBodyEleFile1273551781_renderTo')



I realize that it is an Edge bug and fixing it would just mean changing the ID. My question is why it happens, why it didn't happen on one instance of Edge (I couldn't find setting differences) and how I could generate the ID to ensure it doesn't happen again. It's easy to change it at this place, but without knowing why it happened, it could happen again.



Is there a known hash or number combination an ID is not supposed to have? Is it a legacy setting that I could potentially turn off using meta tags?



I hope this question is not too unspecific for SO - Searching for it proved fruitless because of the legion of getElementById-related questions.






console.log(document.getElementById('extTabsBodyEleFile1273551781_renderTo'));

<div id="extTabsBodyEleFile1273551781_renderTo"></div>






Update:



It seems the ID fails in a case insensitive matter:



extTabsBodyEleFile1273551781_renderTo
exttabsbodyelefile1273551781_renderto
EXTTABSBODYELEFILE1273551781_RENDERTO
ExttAbsbOdyELEfILE1273551781_rEndErtO


All cause the error.




Update:



IE Developer console seems to be at least involved in the error.
Opening a test HTML page that displays the result of trying to retrieve an Element by that ID inside itself instead of logging it to the console works as expected if IE was started with the console closed - until the console is opened and the page refreshed a couple (1-5) of times, whereupon the error appears again and persists until IE is closed and reopened. Closing the developer console after the error appeared seems not to have an effect.



Test HTML is hosted at netlify, HTML code:



<!DOCTYPE HTML>
<html>
<head>
<style>
table, th, td border: 1px solid black;border-collapse: collapse;
th, td padding: 15px;
</style>
</head>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
<div><p id="testresult"></p></div>
<script>
var testresults = document.getElementById('testresult');
var time = new Date().getTime();
testresults.innerHTML = "<h3>testresults:</h3><br><table><tr><th>ID</th><th>Result</th><th>Time</th></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo: ' + "</td><td>" + document.getElementById('extTabsBodyEleFile1273551781_renderTo') + "</td><td>" + time + "</td></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo through querySelector: ' + "</td><td>" + document.querySelector('*[id="extTabsBodyEleFile1273551781_renderTo"]') + "</td><td>" + time + "</td></tr>" +
'</table>';
</script>
</body>
</html>









share|improve this question



















  • 1





    This can be reproduced in EdgeHTML, but are you sure you're not getting IE and Edge mixed up? Those version strings correspond to IE11 on Windows 8.1. Edge is not a Windows 8.1 browser.

    – BoltClock
    Nov 15 '18 at 11:53












  • SCRIPT5022: SCRIPT5022: SecurityError :-!

    – Álvaro González
    Nov 15 '18 at 11:58






  • 1





    I created a Microsoft Feedback hub item: aka.ms/AA37zmi - it might help to vote on it

    – Peter B
    Nov 15 '18 at 12:02











  • @BoltClock You are correct, it's IE 11. Possibly got confused by the "Document Mode: Edge" in the emulation tab in the developer tools. Edited accordingly

    – Kadser
    Nov 15 '18 at 12:03







  • 1





    @Mike 'Pomax' Kamermans it's generated by me, not by anything ms-specific. As said, I could change it, but as long as I don't know what the cause actually was and how to avoid the issue, that seems just a delay before the issue springs up somewhere again, I have thousands of generated IDs in my webapp

    – Kadser
    Nov 16 '18 at 6:46

















21















In Microsoft IE and (according to comments) Edge, getElementById() on an ID that is exactly "extTabsBodyEleFile1273551781_renderTo" fails.



<!DOCTYPE HTML>
<html>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
</body>
</html>


This ID was automatically generated. Changing the ID in any way fixes the problem. Getting the parent of the div and listing its child nodes also includes the div.



The error could be reproduced on both IE 11.0.9600.19155 and 11.0.9600.18538 - but it worked on another machine with IE 11...19155 without issues.



The error can also be reproduced if you open the developer console on a random site, change the ID of any element in the DOM explorer to the ID above and then try to get that element by document.getElementById('extTabsBodyEleFile1273551781_renderTo')



I realize that it is an Edge bug and fixing it would just mean changing the ID. My question is why it happens, why it didn't happen on one instance of Edge (I couldn't find setting differences) and how I could generate the ID to ensure it doesn't happen again. It's easy to change it at this place, but without knowing why it happened, it could happen again.



Is there a known hash or number combination an ID is not supposed to have? Is it a legacy setting that I could potentially turn off using meta tags?



I hope this question is not too unspecific for SO - Searching for it proved fruitless because of the legion of getElementById-related questions.






console.log(document.getElementById('extTabsBodyEleFile1273551781_renderTo'));

<div id="extTabsBodyEleFile1273551781_renderTo"></div>






Update:



It seems the ID fails in a case insensitive matter:



extTabsBodyEleFile1273551781_renderTo
exttabsbodyelefile1273551781_renderto
EXTTABSBODYELEFILE1273551781_RENDERTO
ExttAbsbOdyELEfILE1273551781_rEndErtO


All cause the error.




Update:



IE Developer console seems to be at least involved in the error.
Opening a test HTML page that displays the result of trying to retrieve an Element by that ID inside itself instead of logging it to the console works as expected if IE was started with the console closed - until the console is opened and the page refreshed a couple (1-5) of times, whereupon the error appears again and persists until IE is closed and reopened. Closing the developer console after the error appeared seems not to have an effect.



Test HTML is hosted at netlify, HTML code:



<!DOCTYPE HTML>
<html>
<head>
<style>
table, th, td border: 1px solid black;border-collapse: collapse;
th, td padding: 15px;
</style>
</head>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
<div><p id="testresult"></p></div>
<script>
var testresults = document.getElementById('testresult');
var time = new Date().getTime();
testresults.innerHTML = "<h3>testresults:</h3><br><table><tr><th>ID</th><th>Result</th><th>Time</th></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo: ' + "</td><td>" + document.getElementById('extTabsBodyEleFile1273551781_renderTo') + "</td><td>" + time + "</td></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo through querySelector: ' + "</td><td>" + document.querySelector('*[id="extTabsBodyEleFile1273551781_renderTo"]') + "</td><td>" + time + "</td></tr>" +
'</table>';
</script>
</body>
</html>









share|improve this question



















  • 1





    This can be reproduced in EdgeHTML, but are you sure you're not getting IE and Edge mixed up? Those version strings correspond to IE11 on Windows 8.1. Edge is not a Windows 8.1 browser.

    – BoltClock
    Nov 15 '18 at 11:53












  • SCRIPT5022: SCRIPT5022: SecurityError :-!

    – Álvaro González
    Nov 15 '18 at 11:58






  • 1





    I created a Microsoft Feedback hub item: aka.ms/AA37zmi - it might help to vote on it

    – Peter B
    Nov 15 '18 at 12:02











  • @BoltClock You are correct, it's IE 11. Possibly got confused by the "Document Mode: Edge" in the emulation tab in the developer tools. Edited accordingly

    – Kadser
    Nov 15 '18 at 12:03







  • 1





    @Mike 'Pomax' Kamermans it's generated by me, not by anything ms-specific. As said, I could change it, but as long as I don't know what the cause actually was and how to avoid the issue, that seems just a delay before the issue springs up somewhere again, I have thousands of generated IDs in my webapp

    – Kadser
    Nov 16 '18 at 6:46













21












21








21


4






In Microsoft IE and (according to comments) Edge, getElementById() on an ID that is exactly "extTabsBodyEleFile1273551781_renderTo" fails.



<!DOCTYPE HTML>
<html>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
</body>
</html>


This ID was automatically generated. Changing the ID in any way fixes the problem. Getting the parent of the div and listing its child nodes also includes the div.



The error could be reproduced on both IE 11.0.9600.19155 and 11.0.9600.18538 - but it worked on another machine with IE 11...19155 without issues.



The error can also be reproduced if you open the developer console on a random site, change the ID of any element in the DOM explorer to the ID above and then try to get that element by document.getElementById('extTabsBodyEleFile1273551781_renderTo')



I realize that it is an Edge bug and fixing it would just mean changing the ID. My question is why it happens, why it didn't happen on one instance of Edge (I couldn't find setting differences) and how I could generate the ID to ensure it doesn't happen again. It's easy to change it at this place, but without knowing why it happened, it could happen again.



Is there a known hash or number combination an ID is not supposed to have? Is it a legacy setting that I could potentially turn off using meta tags?



I hope this question is not too unspecific for SO - Searching for it proved fruitless because of the legion of getElementById-related questions.






console.log(document.getElementById('extTabsBodyEleFile1273551781_renderTo'));

<div id="extTabsBodyEleFile1273551781_renderTo"></div>






Update:



It seems the ID fails in a case insensitive matter:



extTabsBodyEleFile1273551781_renderTo
exttabsbodyelefile1273551781_renderto
EXTTABSBODYELEFILE1273551781_RENDERTO
ExttAbsbOdyELEfILE1273551781_rEndErtO


All cause the error.




Update:



IE Developer console seems to be at least involved in the error.
Opening a test HTML page that displays the result of trying to retrieve an Element by that ID inside itself instead of logging it to the console works as expected if IE was started with the console closed - until the console is opened and the page refreshed a couple (1-5) of times, whereupon the error appears again and persists until IE is closed and reopened. Closing the developer console after the error appeared seems not to have an effect.



Test HTML is hosted at netlify, HTML code:



<!DOCTYPE HTML>
<html>
<head>
<style>
table, th, td border: 1px solid black;border-collapse: collapse;
th, td padding: 15px;
</style>
</head>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
<div><p id="testresult"></p></div>
<script>
var testresults = document.getElementById('testresult');
var time = new Date().getTime();
testresults.innerHTML = "<h3>testresults:</h3><br><table><tr><th>ID</th><th>Result</th><th>Time</th></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo: ' + "</td><td>" + document.getElementById('extTabsBodyEleFile1273551781_renderTo') + "</td><td>" + time + "</td></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo through querySelector: ' + "</td><td>" + document.querySelector('*[id="extTabsBodyEleFile1273551781_renderTo"]') + "</td><td>" + time + "</td></tr>" +
'</table>';
</script>
</body>
</html>









share|improve this question
















In Microsoft IE and (according to comments) Edge, getElementById() on an ID that is exactly "extTabsBodyEleFile1273551781_renderTo" fails.



<!DOCTYPE HTML>
<html>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
</body>
</html>


This ID was automatically generated. Changing the ID in any way fixes the problem. Getting the parent of the div and listing its child nodes also includes the div.



The error could be reproduced on both IE 11.0.9600.19155 and 11.0.9600.18538 - but it worked on another machine with IE 11...19155 without issues.



The error can also be reproduced if you open the developer console on a random site, change the ID of any element in the DOM explorer to the ID above and then try to get that element by document.getElementById('extTabsBodyEleFile1273551781_renderTo')



I realize that it is an Edge bug and fixing it would just mean changing the ID. My question is why it happens, why it didn't happen on one instance of Edge (I couldn't find setting differences) and how I could generate the ID to ensure it doesn't happen again. It's easy to change it at this place, but without knowing why it happened, it could happen again.



Is there a known hash or number combination an ID is not supposed to have? Is it a legacy setting that I could potentially turn off using meta tags?



I hope this question is not too unspecific for SO - Searching for it proved fruitless because of the legion of getElementById-related questions.






console.log(document.getElementById('extTabsBodyEleFile1273551781_renderTo'));

<div id="extTabsBodyEleFile1273551781_renderTo"></div>






Update:



It seems the ID fails in a case insensitive matter:



extTabsBodyEleFile1273551781_renderTo
exttabsbodyelefile1273551781_renderto
EXTTABSBODYELEFILE1273551781_RENDERTO
ExttAbsbOdyELEfILE1273551781_rEndErtO


All cause the error.




Update:



IE Developer console seems to be at least involved in the error.
Opening a test HTML page that displays the result of trying to retrieve an Element by that ID inside itself instead of logging it to the console works as expected if IE was started with the console closed - until the console is opened and the page refreshed a couple (1-5) of times, whereupon the error appears again and persists until IE is closed and reopened. Closing the developer console after the error appeared seems not to have an effect.



Test HTML is hosted at netlify, HTML code:



<!DOCTYPE HTML>
<html>
<head>
<style>
table, th, td border: 1px solid black;border-collapse: collapse;
th, td padding: 15px;
</style>
</head>
<body>
<div id="extTabsBodyEleFile1273551781_renderTo"></div>
<div><p id="testresult"></p></div>
<script>
var testresults = document.getElementById('testresult');
var time = new Date().getTime();
testresults.innerHTML = "<h3>testresults:</h3><br><table><tr><th>ID</th><th>Result</th><th>Time</th></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo: ' + "</td><td>" + document.getElementById('extTabsBodyEleFile1273551781_renderTo') + "</td><td>" + time + "</td></tr>" +
'<tr><td>extTabsBodyEleFile1273551781_renderTo through querySelector: ' + "</td><td>" + document.querySelector('*[id="extTabsBodyEleFile1273551781_renderTo"]') + "</td><td>" + time + "</td></tr>" +
'</table>';
</script>
</body>
</html>





console.log(document.getElementById('extTabsBodyEleFile1273551781_renderTo'));

<div id="extTabsBodyEleFile1273551781_renderTo"></div>





console.log(document.getElementById('extTabsBodyEleFile1273551781_renderTo'));

<div id="extTabsBodyEleFile1273551781_renderTo"></div>






javascript internet-explorer-11 microsoft-edge getelementbyid






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 11:16







Kadser

















asked Nov 15 '18 at 11:14









KadserKadser

11617




11617







  • 1





    This can be reproduced in EdgeHTML, but are you sure you're not getting IE and Edge mixed up? Those version strings correspond to IE11 on Windows 8.1. Edge is not a Windows 8.1 browser.

    – BoltClock
    Nov 15 '18 at 11:53












  • SCRIPT5022: SCRIPT5022: SecurityError :-!

    – Álvaro González
    Nov 15 '18 at 11:58






  • 1





    I created a Microsoft Feedback hub item: aka.ms/AA37zmi - it might help to vote on it

    – Peter B
    Nov 15 '18 at 12:02











  • @BoltClock You are correct, it's IE 11. Possibly got confused by the "Document Mode: Edge" in the emulation tab in the developer tools. Edited accordingly

    – Kadser
    Nov 15 '18 at 12:03







  • 1





    @Mike 'Pomax' Kamermans it's generated by me, not by anything ms-specific. As said, I could change it, but as long as I don't know what the cause actually was and how to avoid the issue, that seems just a delay before the issue springs up somewhere again, I have thousands of generated IDs in my webapp

    – Kadser
    Nov 16 '18 at 6:46












  • 1





    This can be reproduced in EdgeHTML, but are you sure you're not getting IE and Edge mixed up? Those version strings correspond to IE11 on Windows 8.1. Edge is not a Windows 8.1 browser.

    – BoltClock
    Nov 15 '18 at 11:53












  • SCRIPT5022: SCRIPT5022: SecurityError :-!

    – Álvaro González
    Nov 15 '18 at 11:58






  • 1





    I created a Microsoft Feedback hub item: aka.ms/AA37zmi - it might help to vote on it

    – Peter B
    Nov 15 '18 at 12:02











  • @BoltClock You are correct, it's IE 11. Possibly got confused by the "Document Mode: Edge" in the emulation tab in the developer tools. Edited accordingly

    – Kadser
    Nov 15 '18 at 12:03







  • 1





    @Mike 'Pomax' Kamermans it's generated by me, not by anything ms-specific. As said, I could change it, but as long as I don't know what the cause actually was and how to avoid the issue, that seems just a delay before the issue springs up somewhere again, I have thousands of generated IDs in my webapp

    – Kadser
    Nov 16 '18 at 6:46







1




1





This can be reproduced in EdgeHTML, but are you sure you're not getting IE and Edge mixed up? Those version strings correspond to IE11 on Windows 8.1. Edge is not a Windows 8.1 browser.

– BoltClock
Nov 15 '18 at 11:53






This can be reproduced in EdgeHTML, but are you sure you're not getting IE and Edge mixed up? Those version strings correspond to IE11 on Windows 8.1. Edge is not a Windows 8.1 browser.

– BoltClock
Nov 15 '18 at 11:53














SCRIPT5022: SCRIPT5022: SecurityError :-!

– Álvaro González
Nov 15 '18 at 11:58





SCRIPT5022: SCRIPT5022: SecurityError :-!

– Álvaro González
Nov 15 '18 at 11:58




1




1





I created a Microsoft Feedback hub item: aka.ms/AA37zmi - it might help to vote on it

– Peter B
Nov 15 '18 at 12:02





I created a Microsoft Feedback hub item: aka.ms/AA37zmi - it might help to vote on it

– Peter B
Nov 15 '18 at 12:02













@BoltClock You are correct, it's IE 11. Possibly got confused by the "Document Mode: Edge" in the emulation tab in the developer tools. Edited accordingly

– Kadser
Nov 15 '18 at 12:03






@BoltClock You are correct, it's IE 11. Possibly got confused by the "Document Mode: Edge" in the emulation tab in the developer tools. Edited accordingly

– Kadser
Nov 15 '18 at 12:03





1




1





@Mike 'Pomax' Kamermans it's generated by me, not by anything ms-specific. As said, I could change it, but as long as I don't know what the cause actually was and how to avoid the issue, that seems just a delay before the issue springs up somewhere again, I have thousands of generated IDs in my webapp

– Kadser
Nov 16 '18 at 6:46





@Mike 'Pomax' Kamermans it's generated by me, not by anything ms-specific. As said, I could change it, but as long as I don't know what the cause actually was and how to avoid the issue, that seems just a delay before the issue springs up somewhere again, I have thousands of generated IDs in my webapp

– Kadser
Nov 16 '18 at 6:46












1 Answer
1






active

oldest

votes


















1














TL;DR



It looks like there are specific strings edge return null if you try to select them, there are 3 strings i found that can't be selected in this fiddle:
https://jsfiddle.net/cogwrudx/4/



I have run tests from 1273 to 1290 ids and found only 3, but i guess there could be more, I don't know why those strings so important that edge doesn't allows to search for them.



Origin



I can't comment but this was really annoying me so I had to do some more testings, and it looks like no matter what changes you will do to this string it will work, but it will NOT work for this exact string.



Adding/removing any letter/number will work.
Changing the last number before the underscore to 2 instead of 1 will work as well.
In fact changing any number to a different number works.



It looks like edge doesn't like that specific string for a reason and I really want to know why.



EDIT 1



After doing some more basic testing I have run the next fiddle:
https://jsfiddle.net/cogwrudx/4/



As you can see after running it and looking the console, there are 2 more ids he doesn't find:



not found: extTabsBodyEleFile1273351781_renderTo
not found: extTabsBodyEleFile1273451781_renderTo
not found: extTabsBodyEleFile1273551781_renderTo


So from this i think there is no obvious pattern to avoid as others suggested, but a very specific strings to search for, as if you try to set the same strings as classes it will not work as well.



FYI



I was testing this on Edge browser on Windows 10, and not IE11.



Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134





share|improve this answer

























  • Same for me, not least so that it won't happen again - there must be a pattern to avoid

    – Kadser
    Nov 15 '18 at 12:05











  • See my update, i did found some extra strings it doesn't work for @Klaue

    – Art3mix
    Nov 15 '18 at 12:32












  • can confirm your update with IE 11. Curious. Running the test again starting from 1274.. got no results.

    – Kadser
    Nov 15 '18 at 12:45











  • Because all of the ids of 1274 are "selectable", i did some tests from 1273 to 1290 and found only those 3 ids that edge couldn't handle them, i'm sure you can find more of those if you keep looking.

    – Art3mix
    Nov 15 '18 at 12:48











  • I will try to inform the MSFT developers about this issue via internal Chanel.

    – Deepak-MSFT
    Nov 16 '18 at 6:04











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53318227%2fgetelementbyid-fails-on-very-specific-id-that-is-definitively-in-the-dom-tree-on%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














TL;DR



It looks like there are specific strings edge return null if you try to select them, there are 3 strings i found that can't be selected in this fiddle:
https://jsfiddle.net/cogwrudx/4/



I have run tests from 1273 to 1290 ids and found only 3, but i guess there could be more, I don't know why those strings so important that edge doesn't allows to search for them.



Origin



I can't comment but this was really annoying me so I had to do some more testings, and it looks like no matter what changes you will do to this string it will work, but it will NOT work for this exact string.



Adding/removing any letter/number will work.
Changing the last number before the underscore to 2 instead of 1 will work as well.
In fact changing any number to a different number works.



It looks like edge doesn't like that specific string for a reason and I really want to know why.



EDIT 1



After doing some more basic testing I have run the next fiddle:
https://jsfiddle.net/cogwrudx/4/



As you can see after running it and looking the console, there are 2 more ids he doesn't find:



not found: extTabsBodyEleFile1273351781_renderTo
not found: extTabsBodyEleFile1273451781_renderTo
not found: extTabsBodyEleFile1273551781_renderTo


So from this i think there is no obvious pattern to avoid as others suggested, but a very specific strings to search for, as if you try to set the same strings as classes it will not work as well.



FYI



I was testing this on Edge browser on Windows 10, and not IE11.



Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134





share|improve this answer

























  • Same for me, not least so that it won't happen again - there must be a pattern to avoid

    – Kadser
    Nov 15 '18 at 12:05











  • See my update, i did found some extra strings it doesn't work for @Klaue

    – Art3mix
    Nov 15 '18 at 12:32












  • can confirm your update with IE 11. Curious. Running the test again starting from 1274.. got no results.

    – Kadser
    Nov 15 '18 at 12:45











  • Because all of the ids of 1274 are "selectable", i did some tests from 1273 to 1290 and found only those 3 ids that edge couldn't handle them, i'm sure you can find more of those if you keep looking.

    – Art3mix
    Nov 15 '18 at 12:48











  • I will try to inform the MSFT developers about this issue via internal Chanel.

    – Deepak-MSFT
    Nov 16 '18 at 6:04















1














TL;DR



It looks like there are specific strings edge return null if you try to select them, there are 3 strings i found that can't be selected in this fiddle:
https://jsfiddle.net/cogwrudx/4/



I have run tests from 1273 to 1290 ids and found only 3, but i guess there could be more, I don't know why those strings so important that edge doesn't allows to search for them.



Origin



I can't comment but this was really annoying me so I had to do some more testings, and it looks like no matter what changes you will do to this string it will work, but it will NOT work for this exact string.



Adding/removing any letter/number will work.
Changing the last number before the underscore to 2 instead of 1 will work as well.
In fact changing any number to a different number works.



It looks like edge doesn't like that specific string for a reason and I really want to know why.



EDIT 1



After doing some more basic testing I have run the next fiddle:
https://jsfiddle.net/cogwrudx/4/



As you can see after running it and looking the console, there are 2 more ids he doesn't find:



not found: extTabsBodyEleFile1273351781_renderTo
not found: extTabsBodyEleFile1273451781_renderTo
not found: extTabsBodyEleFile1273551781_renderTo


So from this i think there is no obvious pattern to avoid as others suggested, but a very specific strings to search for, as if you try to set the same strings as classes it will not work as well.



FYI



I was testing this on Edge browser on Windows 10, and not IE11.



Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134





share|improve this answer

























  • Same for me, not least so that it won't happen again - there must be a pattern to avoid

    – Kadser
    Nov 15 '18 at 12:05











  • See my update, i did found some extra strings it doesn't work for @Klaue

    – Art3mix
    Nov 15 '18 at 12:32












  • can confirm your update with IE 11. Curious. Running the test again starting from 1274.. got no results.

    – Kadser
    Nov 15 '18 at 12:45











  • Because all of the ids of 1274 are "selectable", i did some tests from 1273 to 1290 and found only those 3 ids that edge couldn't handle them, i'm sure you can find more of those if you keep looking.

    – Art3mix
    Nov 15 '18 at 12:48











  • I will try to inform the MSFT developers about this issue via internal Chanel.

    – Deepak-MSFT
    Nov 16 '18 at 6:04













1












1








1







TL;DR



It looks like there are specific strings edge return null if you try to select them, there are 3 strings i found that can't be selected in this fiddle:
https://jsfiddle.net/cogwrudx/4/



I have run tests from 1273 to 1290 ids and found only 3, but i guess there could be more, I don't know why those strings so important that edge doesn't allows to search for them.



Origin



I can't comment but this was really annoying me so I had to do some more testings, and it looks like no matter what changes you will do to this string it will work, but it will NOT work for this exact string.



Adding/removing any letter/number will work.
Changing the last number before the underscore to 2 instead of 1 will work as well.
In fact changing any number to a different number works.



It looks like edge doesn't like that specific string for a reason and I really want to know why.



EDIT 1



After doing some more basic testing I have run the next fiddle:
https://jsfiddle.net/cogwrudx/4/



As you can see after running it and looking the console, there are 2 more ids he doesn't find:



not found: extTabsBodyEleFile1273351781_renderTo
not found: extTabsBodyEleFile1273451781_renderTo
not found: extTabsBodyEleFile1273551781_renderTo


So from this i think there is no obvious pattern to avoid as others suggested, but a very specific strings to search for, as if you try to set the same strings as classes it will not work as well.



FYI



I was testing this on Edge browser on Windows 10, and not IE11.



Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134





share|improve this answer















TL;DR



It looks like there are specific strings edge return null if you try to select them, there are 3 strings i found that can't be selected in this fiddle:
https://jsfiddle.net/cogwrudx/4/



I have run tests from 1273 to 1290 ids and found only 3, but i guess there could be more, I don't know why those strings so important that edge doesn't allows to search for them.



Origin



I can't comment but this was really annoying me so I had to do some more testings, and it looks like no matter what changes you will do to this string it will work, but it will NOT work for this exact string.



Adding/removing any letter/number will work.
Changing the last number before the underscore to 2 instead of 1 will work as well.
In fact changing any number to a different number works.



It looks like edge doesn't like that specific string for a reason and I really want to know why.



EDIT 1



After doing some more basic testing I have run the next fiddle:
https://jsfiddle.net/cogwrudx/4/



As you can see after running it and looking the console, there are 2 more ids he doesn't find:



not found: extTabsBodyEleFile1273351781_renderTo
not found: extTabsBodyEleFile1273451781_renderTo
not found: extTabsBodyEleFile1273551781_renderTo


So from this i think there is no obvious pattern to avoid as others suggested, but a very specific strings to search for, as if you try to set the same strings as classes it will not work as well.



FYI



I was testing this on Edge browser on Windows 10, and not IE11.



Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 15 '18 at 12:52

























answered Nov 15 '18 at 11:52









Art3mixArt3mix

364110




364110












  • Same for me, not least so that it won't happen again - there must be a pattern to avoid

    – Kadser
    Nov 15 '18 at 12:05











  • See my update, i did found some extra strings it doesn't work for @Klaue

    – Art3mix
    Nov 15 '18 at 12:32












  • can confirm your update with IE 11. Curious. Running the test again starting from 1274.. got no results.

    – Kadser
    Nov 15 '18 at 12:45











  • Because all of the ids of 1274 are "selectable", i did some tests from 1273 to 1290 and found only those 3 ids that edge couldn't handle them, i'm sure you can find more of those if you keep looking.

    – Art3mix
    Nov 15 '18 at 12:48











  • I will try to inform the MSFT developers about this issue via internal Chanel.

    – Deepak-MSFT
    Nov 16 '18 at 6:04

















  • Same for me, not least so that it won't happen again - there must be a pattern to avoid

    – Kadser
    Nov 15 '18 at 12:05











  • See my update, i did found some extra strings it doesn't work for @Klaue

    – Art3mix
    Nov 15 '18 at 12:32












  • can confirm your update with IE 11. Curious. Running the test again starting from 1274.. got no results.

    – Kadser
    Nov 15 '18 at 12:45











  • Because all of the ids of 1274 are "selectable", i did some tests from 1273 to 1290 and found only those 3 ids that edge couldn't handle them, i'm sure you can find more of those if you keep looking.

    – Art3mix
    Nov 15 '18 at 12:48











  • I will try to inform the MSFT developers about this issue via internal Chanel.

    – Deepak-MSFT
    Nov 16 '18 at 6:04
















Same for me, not least so that it won't happen again - there must be a pattern to avoid

– Kadser
Nov 15 '18 at 12:05





Same for me, not least so that it won't happen again - there must be a pattern to avoid

– Kadser
Nov 15 '18 at 12:05













See my update, i did found some extra strings it doesn't work for @Klaue

– Art3mix
Nov 15 '18 at 12:32






See my update, i did found some extra strings it doesn't work for @Klaue

– Art3mix
Nov 15 '18 at 12:32














can confirm your update with IE 11. Curious. Running the test again starting from 1274.. got no results.

– Kadser
Nov 15 '18 at 12:45





can confirm your update with IE 11. Curious. Running the test again starting from 1274.. got no results.

– Kadser
Nov 15 '18 at 12:45













Because all of the ids of 1274 are "selectable", i did some tests from 1273 to 1290 and found only those 3 ids that edge couldn't handle them, i'm sure you can find more of those if you keep looking.

– Art3mix
Nov 15 '18 at 12:48





Because all of the ids of 1274 are "selectable", i did some tests from 1273 to 1290 and found only those 3 ids that edge couldn't handle them, i'm sure you can find more of those if you keep looking.

– Art3mix
Nov 15 '18 at 12:48













I will try to inform the MSFT developers about this issue via internal Chanel.

– Deepak-MSFT
Nov 16 '18 at 6:04





I will try to inform the MSFT developers about this issue via internal Chanel.

– Deepak-MSFT
Nov 16 '18 at 6:04



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53318227%2fgetelementbyid-fails-on-very-specific-id-that-is-definitively-in-the-dom-tree-on%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo