Skip to content

Commit a8b37d9

Browse files
LocalIdentityLocalIdentity
andauthored
Disable right click to paste in the notes tab (#2085)
Right clicking pastes text into any of the input boxes but feels like it shouldn't exist in the notes tab Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 5ab823a commit a8b37d9

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/Classes/EditControl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ function EditClass:OnKeyDown(key, doubleClick)
520520
self:ReplaceSel("")
521521
end
522522
end
523-
elseif key == "v" and ctrl or key == "RIGHTBUTTON" and self.Object:IsMouseOver() then
523+
elseif key == "v" and ctrl or key == "RIGHTBUTTON" and self.Object:IsMouseOver() and not self.disableRightClickPaste then
524524
local text = Paste()
525525
if text then
526526
if self.pasteFilter then

src/Classes/NotesTab.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Below are some common color codes PoB uses: ]]
3232
self.controls.default = new("ButtonControl", {"TOPLEFT",self.controls.intelligence,"TOPLEFT"}, {120, 0, 100, 18}, "^7DEFAULT", function() self:SetColor("^7") end)
3333

3434
self.controls.edit = new("EditControl", {"TOPLEFT",self.controls.fire,"TOPLEFT"}, {0, 48, 0, 0}, "", nil, "^%C\t\n", nil, nil, 16, true)
35+
self.controls.edit.disableRightClickPaste = true
3536
self.controls.edit.width = function()
3637
return self.width - 16
3738
end

0 commit comments

Comments
 (0)