dijit icon indicating copy to clipboard operation
dijit copied to clipboard

DOMException: Failed to execute 'querySelectorAll' on '[group=group1] [role=role1]' is not a valid selector.

Open luiscla27 opened this issue 5 years ago • 2 comments

Hello,

It seems that the selectorEngine "lite" isn't well implementated at "dijit/RadioButtonMenuItem", currently you have the following code with the uncompatibility:

`

	_getRelatedWidgets: function(){
		// Private function needed to help iterate over all radio menu items in a group.
		var ary = [];
		query("[group=" + this.group + "][role=" + this.role + "]").forEach(
			function(menuItemNode){
				var widget = registry.getEnclosingWidget(menuItemNode);
				if(widget){
					ary.push(widget);
				}
			}
		);
		return ary;
	}

` I think you need to change the query to:

query("[group='" + this.group + "'][role='" + this.role + "']")

luiscla27 avatar Jul 26 '18 16:07 luiscla27

I'll make a pull request fixing this as soon as someone here accept this is an actual issue... thanks.

luiscla27 avatar Jul 26 '18 17:07 luiscla27

What browser are you seeing this error in?

The CSS 2 (and 3) specs show examples with unquoted values. I tested the lite engine (which delegates to the browser's querySelectorAll implementation when available) in Chrome 80, Firefox 74, and IE 11, and in all cases the code above works.

msssk avatar Apr 02 '20 23:04 msssk

This was caused by the issue tested here. It was a Google Chrome bug, they fixed it pretty fast, so there was no reason to make a PR.

luiscla27 avatar Aug 30 '23 23:08 luiscla27