[Webkit-unassigned] [Bug 80529] Web Inspector: Creating a selector for class names with trailing spaces results with two dots instead of one

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 8 02:46:26 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=80529





--- Comment #1 from vivekgalatage <vivekgalatage at gmail.com>  2012-03-08 02:46:26 PST ---
The problem is with Source/WebCore/inspector/front-end/DOMAgent.js file's method appropriateSelectorFor. This is the method which chooses the appropriate selector for the currently selected node in the Element view.

So now as the existing class has a trailing spaces i.e. " dummy" the function misses to remove this space at the beginning and goes on prefixing the . before the className variable.

Also the regular expression removes the white spaces with "." so it appears twice  when added.

So this has to be trimmed before using. 

The change is on the line no 348 and change it as below -

var selector = "." + className.trim().replace(/\s+/, ".");

Will upload the patch for this fix soon.

Thank you,
Vivek

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list