HTML双击选择奇数 [英] HTML Double Click Selection Oddity

查看:127
本文介绍了HTML双击选择奇数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有在DocType上发布,因为它不是真正的设计的东西,视觉表示不是我的问题,行为是。我很抱歉,如果这是错误的,但我不觉得这是一个设计师的问题。

I didn't post this on DocType because it's not really a design thing, the visual representation isn't my problem, the behaviour is. I'm sorry if this is misplaced but I don't feel it's a designer issue.

以下DOM:

<ul style="overflow: hidden;">
   <li style="float: left;"><strong>SKU:</strong>123123</li>
   <li style="float: left;"><strong>ILC:</strong>asdasdasdasd</li>
</ul>

<div style="overflow: hidden;">
   <div style="float: left; width: 49%"><strong>SKU:</strong>123123</div>
   <div style="margin-left: 50%; width: auto;"><strong>ILC:</strong>asdasdasdasd</div>
</div>

<p>
   <span><strong>SKU:</strong>123123</span>
   <span><strong>ILC:</strong>asdasdasdasd</span>
</p>

所有这些都表示我在


  • IE 6

  • IE 7

  • Firefox 3.x

  • Chrome

  • IE 6
  • IE 7
  • Firefox 3.x
  • Chrome

但不在


  • IE 8

当您在SKU:后双击123123时,会选择123123AND ILC:'从下一个dom元素。

When you double click '123123' after 'SKU:', it selects '123123' AND 'ILC:' from the next dom element.

在这个页面上的任何文本(在这里SO),双击一个单词,它只选择 THAT WORD ,甚至在段落的中间。这些例子有dom元素关闭它们,任何人都知道为什么会发生这种情况。

Take any text on this page (here in SO), double click a word, it only selects THAT WORD, even in the middle of a paragraph. These examples have dom elements closing them, anyone know why this is happening.

我的同事使用双击机制选择相关的产品ID来做他们的工作,这对我来说没有什么意义。

My fellow employees use the 'double click' mechanism to select the relevant product ID's to do their job, and this dosen't make sense to me what soever.

推荐答案

我也有同样的问题。如果你在你的li的结束标签之前放置一个空格,应该修复它。

I had the same problem. If you put a space before the closing tag of your li that should fix it.

<ul style="overflow: hidden;">
    <li style="float: left;"><strong>SKU:</strong>123123 </li>
    <li style="float: left;"><strong>ILC:</strong>asdasdasdasd </li>
</ul>

这篇关于HTML双击选择奇数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆