X
Нажмите здесь, чтобы перейти на мобильную версию сайта.

Форум поддержки

How to select partial link text without navigating

Размещено

l want to select some text which is part of a hyperlink. I know this method:

  • Press ALT.
  • Select text with LMB.
  • Release LMB.
  • Release ALT.

which usually works but not always. It seems if the mouse is still over part of the link when the button goes up, it navigates. This can be a problem if the link extends outside the text (I think this is the cause?) For example, try selecting some or all of 'Adam Curtis' (under the date and next to the thumbnail) on this page:

https://www.bbc.co.uk/blogs/adamcurtis/entries/512cde83-3afb-3048-9ece-dba774b10f89

I was not able to do this easily without triggering the link.

Is there a better way?

(I'm using FF 69 on Windows 10)

l want to select some text which is part of a hyperlink. I know this method: * Press ALT. * Select text with LMB. * Release LMB. * Release ALT. which usually works but not always. It seems if the mouse is still over part of the link when the button goes up, it navigates. This can be a problem if the link extends outside the text (I think this is the cause?) For example, try selecting some or all of 'Adam Curtis' (under the date and next to the thumbnail) on this page: https://www.bbc.co.uk/blogs/adamcurtis/entries/512cde83-3afb-3048-9ece-dba774b10f89 I was not able to do this easily without triggering the link. Is there a better way? (I'm using FF 69 on Windows 10)

Изменено Peter

Выбранное решение

I would use the Inspector to get the link in cases like this when there is a problem.

It does work for me if I start dragging with the mouse outside the focus ring of the link. Start at the text (don't press the left mouse button yet) and move the mouse until you get the normal mouse pointer, then press Alt and left-click and move the mouse back to select the text from right to left, then release the left mouse button and the alt key, then right-click and copy the selection: Adam Curtis

The mouse pointer in the last two screenshots is misplaced for some reason.

Прочитайте этот ответ в контексте 1
Цитата

Дополнительные сведения о системе

Установленные плагины

None.

Приложение

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

Дополнительная информация

jscher2000
  • Top 10 Contributor
8797 решений 71970 ответов
Размещено

Normally Alt will override the click. In other words, if you hold down the Alt key and click a normal link, nothing should happen.

I think you are right that when it doesn't work, it is related to the way the link is constructed. In the BBC example, the link covers a large rectangular area that also contains an image (see attached from the Page Inspector tool). Something about this layout seems to be overriding the usual behavior.

I don't know what would be a convenient workaround for cases like this.

Normally Alt will override the click. In other words, if you hold down the Alt key and click a normal link, nothing should happen. I think you are right that when it doesn't work, it is related to the way the link is constructed. In the BBC example, the link covers a large rectangular area that also contains an image (see attached from the Page Inspector tool). Something about this layout seems to be overriding the usual behavior. I don't know what would be a convenient workaround for cases like this.
Помогла ли вам это?
Цитата
cor-el
  • Top 10 Contributor
  • Moderator
17586 решений 159092 ответов
Размещено

Выбранное решение

I would use the Inspector to get the link in cases like this when there is a problem.

It does work for me if I start dragging with the mouse outside the focus ring of the link. Start at the text (don't press the left mouse button yet) and move the mouse until you get the normal mouse pointer, then press Alt and left-click and move the mouse back to select the text from right to left, then release the left mouse button and the alt key, then right-click and copy the selection: Adam Curtis

The mouse pointer in the last two screenshots is misplaced for some reason.

I would use the Inspector to get the link in cases like this when there is a problem. It does work for me if I start dragging with the mouse outside the focus ring of the link. Start at the text (don't press the left mouse button yet) and move the mouse until you get the normal mouse pointer, then press Alt and left-click and move the mouse back to select the text from right to left, then release the left mouse button and the alt key, then right-click and copy the selection: Adam Curtis The mouse pointer in the last two screenshots is misplaced for some reason.

Изменено cor-el

Помогла ли вам это? 1
Цитата
jscher2000
  • Top 10 Contributor
8797 решений 71970 ответов
Размещено

Полезный ответ

cor-el said

It does work for me if I start dragging with the mouse outside the focus ring of the link.

Interesting technique! In order to see the focus ring, you can double-click a word before the link and then press the Tab key to move the focus to the next link or form field. I'm attaching a screenshot of how that appears on Windows for me. Then with the dotted outline visible, you can use cor-el's technique of starting your selection beyond the edge of the focus ring to avoid triggering the link.

Edit: Actually, on this page, you don't need to hold Alt when using this method. Because the "mouse down" occurred outside the link, when the "mouse up" occurs on the link, it doesn't complete a click event on the link.

''cor-el [[#answer-1249475|said]]'' <blockquote> It does work for me if I start dragging with the mouse outside the focus ring of the link. </blockquote> Interesting technique! In order to see the focus ring, you can double-click a word before the link and then press the Tab key to move the focus to the next link or form field. I'm attaching a screenshot of how that appears on Windows for me. Then with the dotted outline visible, you can use cor-el's technique of starting your selection ''beyond the edge of the focus ring'' to avoid triggering the link. '''''Edit:''' Actually, on this page, you don't need to hold Alt when using this method. Because the "mouse down" occurred outside the link, when the "mouse up" occurs on the link, it doesn't complete a click event on the link.''

Изменено jscher2000

Помогла ли вам это? 1
Цитата
cor-el
  • Top 10 Contributor
  • Moderator
17586 решений 159092 ответов
Размещено

I had forgotten that I started dragging outside the link area and thus wouldn't need the alt key :wink:

I see the focus ring when I move the mouse around this area. I've added some screenshots to my above reply (had difficulties with getting the mouse pointer in the screenshot).

I had forgotten that I started dragging outside the link area and thus wouldn't need the alt key :wink: I see the focus ring when I move the mouse around this area. I've added some screenshots to my above reply (had difficulties with getting the mouse pointer in the screenshot).
Помогла ли вам это? 1
Цитата
Размещено

Задавший вопрос

Thank you both for your help. The technique of using the focus rectangle to see the boundaries of the link is very useful. In the meantime Adam Curtis is wondering why he's getting so many clicks on his homepage... ;)

Thank you both for your help. The technique of using the focus rectangle to see the boundaries of the link is very useful. In the meantime Adam Curtis is wondering why he's getting so many clicks on his homepage... ;)
Помогла ли вам это?
Цитата
Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.