Clicking on an empty block-level element selects it




7 years ago
7 years ago


(Reporter: Runcy Oommen, Unassigned)


(Depends on: 1 bug, {regression, testcase})

regression, testcase

Firefox Tracking Flags

(Not tracked)



(2 attachments)



7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100401 Firefox/3.6.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100401 Firefox/3.6.3

The right-click menu options displayed when being clicked on top from the bing background image is different on being clicked multiple times. There has to be a consistency in the options displayed.

Reproducible: Always

Steps to Reproduce:
1. Open and right-click on the background image displayed
2. Do not select anything and just left-click somewhere else again on the background image
3. Now again right-click on the background image
Actual Results:  
It can be seen that the right-click menu options displayed on the first instance and second instance are totally different. Now anytime you right-click on the image only the second set of options are displayed until is reloaded again.
(Screenshots attached of the different set of menu options)

Expected Results:  
menu options have to be consistent and should not change on right-clicking on the image multiple times.

It works fine on other browsers like IE 8 and Chrome.

From what I could troubleshoot, when a right-click was done on the background image on the first instance, an auto-selection happened on the below given <DIV> element in the bing web page as below:

<div class=" sw_imLd" style="height: 497px; background-image: url(&quot;;); opacity: 1;" id="bgDiv"></div>

Because of this the second set of menu-options were selected. Hence there is some sort of wrong interpretation with FF and the HTML <DIV> element when right-click was performed from a background-image

Comment 1

7 years ago
Created attachment 452782 [details]
Screenshot of right-click menu options variations

Attaching the screenshots of the right-click menu options performed on the background image

Comment 2

7 years ago
(In reply to comment #0)

I tried this and was able to reproduce the issue.
But you don't necessarily have to reload, hit escape after the first click and try once again.

Comment 3

7 years ago
I can reproduce this issue.

Left-clicking on the image is what selects it, not right-clicking. In step 2, if you left-click somewhere outside of the image (e.g., on the gray/blue background) then right-clicking on the image in step 3 no longer gives the different menu. Further, step 1 isn't necessary to reproduce this: simply left-clicking on the image then right-clicking will give the different menu options, since now the image is selected.

Comment 4

7 years ago
This is observed even with FF 4.0, any plans to fix?
Severity: major → normal

Comment 5

7 years ago
Created attachment 526112 [details]

Comment 6

7 years ago
There is nothing wrong with the menus.  What is going on is that when you clicked on that picture (which is actually an empty div with a background image), you selected it, and the context menu that you got was the context menu of that selection, not of the page.  Clicking outside of that div unselects it.  So the context menus in this case are merely the means through with this behavior is manifesting itself.

I don't know if this behavior is intended or not.  It does seem wrong because, aside from the altered behavior of the context menu, there are no indicators that the element had been selected.

Note that this only happens to empty block-level elements.  If the div contains anything--even if it's another empty div or span--it won't be selected.
Component: Menus → Selection
Ever confirmed: true
Product: Firefox → Core
QA Contact: menus → selection
Summary: Right-click menu options differ on being clicked multiple times on the bing background image → Clicking on an empty block-level element selects it
Version: unspecified → Trunk
This is (if at all) a Regression of 3.0 against 2.x.
Keywords: regression, testcase

Comment 8

7 years ago
(In reply to comment #7)
> This is (if at all) a Regression of 3.0 against 2.x.

Oh no, this bug is more ancient than that: this broke between 1.5 and 2.

Luckily, Core/Selection is a pretty small component, and a quick skim of the fixed bugs revealed one with a promising title: bug 316281.  The build right before that bug landed did not exhibit this problem, and the build immediately after its landing does.

That bug resulted in a number of regressions, including bug 433643, which, from its description, sounds like it is the same bug: a common underlying problem producing two sets of symptoms.  So I'll dupe it to that; we can undupe it if it turns out that these are actually separate issues.
Last Resolved: 7 years ago
Depends on: 433643
Resolution: --- → DUPLICATE
Duplicate of bug: 433643
You need to log in before you can comment on or make changes to this bug.