This question already has an answer here:
'innerText' works in IE, but not in Firefox
var allTitles = $("[href='...']").closest(".your-class").find(".field_text"); var name = allTitles.children().first().text(); console.log(name);
The problem was actually with
children.innerText, it doesn't work with Firefox.
Just changed to
children.textContent and it solved the problem.
Reference: children.innerText is not working in firefox