Suppressing the thick selection-border in Netscape and FireFox

Hi, all!

I have the next problem in Netscape and FireFox browsers. When user clicks by left mouse button over some tags (<object>, <td>...) with pressed CONTROL-key, thick  border appears around. My HTML-page uses left mouse button click with pressed CONTROL and such behavior of Netscape is confuses user.

Who know, how can i turn off this border?  Atleast, for <table>, <tr>, <td> and <object> tags.

Also, i want to make all page elements nonselectable. User should not be able to select text and other elements by mouse. Normal behaviour should be kept only for <input> and <textarea>.

How to cancel selection in Netscape and FireFox browsers? I had cancelled selection and context menu in Internet Explorer, but not in Netscape and FireFox.

In Microsoft Internet Explorer i had done it as:

var isIEBrowser = navigator.appName.indexOf( "Microsoft" ) != -1;

        var b = document.getElementById( "idBody" );
      if( b )
            b.oncontextmenu = cancelContextMenu;
            if( isIEBrowser )
                  b.onselectstart = cancelSelect;

function cancelContextMenu( e )
      var ev = new InterEvent( e );
      var name = ev.srcEl.tagName.toLowerCase();
      return name == "input" || name == "textarea";
function cancelSelect()
       var ev = window.event;

      var name = ev.srcEl.tagName.toLowerCase();
      if( name != "input" && name != "textarea" )
                ev.returnValue = false;
                ev.cancelBubble = true;
            return false;
            return true;

Alexey FedorovSoftware developerAsked:
Who is Participating?
GrandSchtroumpfConnect With a Mentor Commented:
> You will see, in some places around <table>, <td> tags dark blue thick borders.
I know the border is not a bug, it's a firefox selection feature.  It allows you to select an entire cell.  If you do ctrl+c when that thick border shows, then it copies the content of the cell to the clipboard.  It's very nice to copy/paste code posted to this forum for example.
Note that it only works on table cells, so moving your layout from table-based to css-only will solve the problem.

> Mouse click will be passed to browser if you left-click  over "Flash Player" only in case if "Flash Player" is activated as "Windowless" and "Transparent".
I don't know much about flash... but why don't you set your flash properties to something else than "Windowless" and "Transparent"?  Then you should not get the cell selection.
Why would you want to change normal browser behaviour?
The ctrl+click is a great feature in firefox, i use it very often.
If you want to protect your text from being copied, then put it inside a PNG or GIF image, that's the only way.
Alexey FedorovSoftware developerAuthor Commented:
A thick rectangle appearing around <td> or <object> is confuse user. In my application <object>/<embed> tags are representing "Macromedia Flash Player" placed inside <td>. I had implemented a drawings viewer based on "Flash Player" which functionality includes ZoomIn, ZoomOut, Pan and some other functions. And, a thick frame caused by "ctrl+left click" is an unexpected and hindering decoration.

It is uncorrelated with design and  functionality.

The ability to select HTML-elements (text, buttons...) in some cases is stiring to "Pan" and to "Zoom by Window" drawings by mouse. Dark blue selection appears as unpredictable and covers "Flash Player" and neighbouring HTML-elements. Looks awfully. In "Internet Explorer" it is already suppressed by me and works fine, but in Netscape and FireFox is not.

I had programmed for "Internet Explorer", but in Netscape and FireFox - i am beginner.  Who can assist to suppress "thick rectangle" caused by "ctrl+left click" and ability to select elements?
Ok, it makes much more sense now with these additional comments.
It seems to be a bug in the flash plugin, i just did the same thing over a java applet, and the ctrl+click is not passed to the browser.
You can send a bug report to Macromedia (or should i say to Adobe...)
Alexey FedorovSoftware developerAuthor Commented:
Hi, GrandSchtroumpf!

No. It is not a bug. Open "" in Netscape or FireFox, press and hold CONTROL key and try to click "left mouse button" over the HTML-page. You will see, in some places around <table>, <td> tags dark blue thick borders.

Also, i want to notice. Mouse click will be passed to browser if you left-click  over "Flash Player" only in case if "Flash Player" is activated as "Windowless" and "Transparent". In order to reach this, you
<PARAM NAME="WMode" VALUE="transparent">  should insert inside <object> tag.

<OBJECT  id="idFla"  style="border-style: none; " codeBase=",0,0,0"
 height="450" width="100%" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  VIEWASTEXT  >
     <PARAM NAME="FlashVars" VALUE="">
     <PARAM NAME="Movie" VALUE="FlashLoader.ashx?swfid=<%#SwfURL%>">
     <PARAM NAME="WMode" VALUE="transparent">
      <PARAM NAME="Play" VALUE="false">
      <PARAM NAME="Loop" VALUE="false">
      <PARAM NAME="Quality" VALUE="High">
      <PARAM NAME="SAlign" VALUE="LT">
      <PARAM NAME="Scale" VALUE="noscale">
      <PARAM NAME="Menu" VALUE="false">
      <PARAM NAME="Base" VALUE="">
      <PARAM NAME="AllowScriptAccess" VALUE="sameDomain">                                                                  
      <PARAM NAME="DeviceFont" VALUE="0">
      <PARAM NAME="EmbedMovie" VALUE="0">
      <PARAM NAME="SWRemote" VALUE="">
      <PARAM NAME="MovieData" VALUE="">
      <PARAM NAME="SeamlessTabbing" VALUE="1">                                                                                    
      <param name = "SWLIVECONNECT" value = "true" >                                                                                    
      <embed id="idFlaEmb"  name="idFla" Scale = "noscale" src="FlashLoader.ashx?swfid=<%#SwfURL%>" quality="high" bgcolor="#ffffff" height="450" width="100%"  allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=""  SWLIVECONNECT = "true" MENU="false" WMode = "transparent" SAlign="LT" />
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.