Bug 120804 - Web Inspector: Edit Breakpoint popover sometimes appears misplaced in top left
Summary: Web Inspector: Edit Breakpoint popover sometimes appears misplaced in top left
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
Keywords: InRadar
Depends on:
Reported: 2013-09-05 15:37 PDT by Joseph Pecoraro
Modified: 2013-09-05 17:54 PDT (History)
5 users (show)

See Also:

[PATCH] Proposed Fix (2.48 KB, patch)
2013-09-05 15:40 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2013-09-05 15:37:25 PDT
Occasionally the Edit Breakpoint popover is poorly sized and misplaced in the top left. This looks really bad!

1. Inspect <http://bogojoker.com/shell/>
2. Set a breakpoint on easySlider.min.js:3
3. Edit Breakpoint + set autoContinue
4. Close and reopen inspector (to save changes)
5. Reload page (⌘R)
6. Select breakpoint in sidebar
7. Choose Edit Breakpoint either in the Sidebar or Gutter
NOTE: Repeat steps 5-7 as needed till you reproduce
  => misplaced popover
Comment 1 Joseph Pecoraro 2013-09-05 15:37:50 PDT
After some debugging, this appears to happen when the element that is the contextmenu event's targetElement is no longer in the DOM by the time we call getBoundingClientRect. So we can grab the bounding client rect earlier, and not carry the element around.
Comment 2 Radar WebKit Bug Importer 2013-09-05 15:37:52 PDT
Comment 3 Joseph Pecoraro 2013-09-05 15:40:59 PDT
Created attachment 210672 [details]
[PATCH] Proposed Fix
Comment 4 WebKit Commit Bot 2013-09-05 17:54:42 PDT
Comment on attachment 210672 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 210672

Committed r155165: <http://trac.webkit.org/changeset/155165>
Comment 5 WebKit Commit Bot 2013-09-05 17:54:44 PDT
All reviewed patches have been landed.  Closing bug.