When you attempt to select a form text input or textarea element with the Web Inspector's magnifying glass tool, it incorrectly selects the body of the page. This behavior does not seem to occur for other form elements like selects and buttons.
I discovered today the the same thing will happen for elements inside iframes. If you activate the magnifying glass tool and hover an element which is inside an iframe, it is correctly highlighted with a blue box, but clicking on it will select the parent frame's body tag in the inspector.
Created attachment 52945 [details] [PATCH] Proposed fix.
Comment on attachment 52945 [details] [PATCH] Proposed fix. > void InspectorController::inspect(Node* node) > { > - if (!canPassNodeToJavaScript(node) || !enabled()) > - return; > - If (!enabled) check should be preserved. r- for that Would be really nice if we started accompanying Web Inspector changes with tests.
Created attachment 52952 [details] [PATCH] Proposed fix. In fact I needed to fix more to make it work.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/InspectorController.cpp M WebCore/inspector/InspectorController.h M WebCore/page/EventHandler.cpp Committed r57337