Ramkhamhaeng
Warlord
- Joined
- Feb 24, 2014
- Messages
- 215
Hello,
the forum software shows an, in my opinion, really annoying behavior: It's a common reflex to mark text with the mouse during reading a longer text. In this forums this immediately triggers a tool-tip below the selected text. This disturbs the reading flow because it overlays the next line to read.
I would suggest to change the functionality by:
1. Only show the popup if multiple words, e.g. 3, are selected.
2. Place the tool-tip, at least for one-liner, top of the selected text where it simply can be ignored.
Please post in this thread if you also find such a change useful. Maybe it's just me who is annoyed by the current state…
To be more constructive I've viewed into the CSS/JS stuff: I've found this code in js/xf/message.js:
So for the first suggestion this code (untested) should suppress the popup for less than three words.
Changes for 2. are more complex (e.g. little arrow in the tooltip box of current style pointing to the text (css class tooltip--bottom → tooltip-top), thus I do not wanna suggest code for a replacing of the tooltip.
the forum software shows an, in my opinion, really annoying behavior: It's a common reflex to mark text with the mouse during reading a longer text. In this forums this immediately triggers a tool-tip below the selected text. This disturbs the reading flow because it overlays the next line to read.
I would suggest to change the functionality by:
1. Only show the popup if multiple words, e.g. 3, are selected.
2. Place the tool-tip, at least for one-liner, top of the selected text where it simply can be ignored.
Please post in this thread if you also find such a change useful. Maybe it's just me who is annoyed by the current state…

To be more constructive I've viewed into the CSS/JS stuff: I've found this code in js/xf/message.js:
Code:
981 if (!range.toString().trim().length)
982 {
983 if (!range.cloneContents().querySelectorAll('img').length)
984 {
985 return null
986 }
987 }
So for the first suggestion this code (untested) should suppress the popup for less than three words.
Code:
const text = range.toString.trim()
if (!text.length)
{
if (!range.cloneContents().querySelectorAll('img').length)
{
return null
}
}
// Avoid popup with less than 3 words
if (text.split(" ", 3).length < 3) return null
Changes for 2. are more complex (e.g. little arrow in the tooltip box of current style pointing to the text (css class tooltip--bottom → tooltip-top), thus I do not wanna suggest code for a replacing of the tooltip.
Last edited: